]> err.no Git - util-linux/commitdiff
switch_root: remove TIOCSCTTY and setsid()
authorKarel Zak <kzak@redhat.com>
Fri, 9 Oct 2009 13:00:38 +0000 (15:00 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 30 Nov 2009 11:42:00 +0000 (12:42 +0100)
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 <kzak@redhat.com>
sys-utils/switch_root.c

index b192a08e5f498c3e2077d3e7ce00bf7269397245..174e667c81787105700f4370f667d95d38da4122 100644 (file)
@@ -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);
 }