cttyhack fix

Constantine Shulyupin const at linuxdriver.co.il
Thu May 13 20:10:58 UTC 2010


diff --git a/shell/cttyhack.c b/shell/cttyhack.c
index 572a3af..90c73c1 100644
--- a/shell/cttyhack.c
+++ b/shell/cttyhack.c
@@ -69,6 +69,7 @@ int cttyhack_main(int argc UNUSED_PARAM, char **argv)
               dup2(fd, 2);
               while (fd > 2) close(fd--);
               /* Some other session may have it as ctty. Steal it from them */
+               setsid();
               ioctl(0, TIOCSCTTY, 1);
       }


--
Constantine Shulyupin
Embedded Linux Expert
TI DaVinci Expert
Tel-Aviv Israel
http://www.LinuxDriver.co.il/


More information about the busybox mailing list