aboutsummaryrefslogtreecommitdiff
path: root/init/init.c
diff options
context:
space:
mode:
authorpgf <pgf@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-08-01 16:43:13 +0000
committerpgf <pgf@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-08-01 16:43:13 +0000
commitd93ca99dc0e395285e93d9b3a8417af5d5f52c89 (patch)
treee051b9b4fceba69fb263e28a7275b3feb480d6e7 /init/init.c
parentc0b300d5e2c6bfb5484d7beb0400a280d4d77ea4 (diff)
downloadbusybox-w32-d93ca99dc0e395285e93d9b3a8417af5d5f52c89.tar.gz
busybox-w32-d93ca99dc0e395285e93d9b3a8417af5d5f52c89.tar.bz2
busybox-w32-d93ca99dc0e395285e93d9b3a8417af5d5f52c89.zip
applying patch from bug 24:
0000024 03-16-05 patch: allow init to set controlling tty git-svn-id: svn://busybox.net/trunk/busybox@11007 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to '')
-rw-r--r--init/init.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/init/init.c b/init/init.c
index 8687b106c..0f49a45d8 100644
--- a/init/init.c
+++ b/init/init.c
@@ -577,6 +577,13 @@ static pid_t run(const struct init_action *a)
577 cmd[0][0] = '-'; 577 cmd[0][0] = '-';
578 strcpy(cmd[0] + 1, s); 578 strcpy(cmd[0] + 1, s);
579 } 579 }
580#ifdef CONFIG_FEATURE_INIT_SCTTY
581 /* Establish this process as session leader and
582 * (attempt) to make the tty (if any) a controlling tty.
583 */
584 (void) setsid();
585 (void) ioctl(0, TIOCSCTTY, 0/*don't steal it*/);
586#endif
580 } 587 }
581 588
582#if !defined(__UCLIBC__) || defined(__ARCH_HAS_MMU__) 589#if !defined(__UCLIBC__) || defined(__ARCH_HAS_MMU__)