From: Karel Zak Date: Fri, 9 Oct 2009 13:00:38 +0000 (+0200) Subject: switch_root: remove TIOCSCTTY and setsid() X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e4376eec12a2e9ab3f3d3406cde525900719877;p=util-linux switch_root: remove TIOCSCTTY and setsid() requested by dracut developers because: bash: cannot set terminal process group (-1): Inappropriate ioctl for device Addresses-Red-Hat-Bug: #519237 Signed-off-by: Karel Zak --- diff --git a/sys-utils/switch_root.c b/sys-utils/switch_root.c index b192a08e..174e667c 100644 --- a/sys-utils/switch_root.c +++ b/sys-utils/switch_root.c @@ -267,13 +267,6 @@ int main(int argc, char *argv[]) if (access(init, X_OK)) warn("cannot access %s", init); - /* get session leader */ - setsid(); - - /* set controlling terminal */ - if (ioctl (0, TIOCSCTTY, 1)) - warn("failed to TIOCSCTTY"); - execv(init, initargs); err(EXIT_FAILURE, "failed to execute %s", init); }