diff options
author | Paul Fox <pgf@brightstareng.com> | 2005-08-01 16:43:13 +0000 |
---|---|---|
committer | Paul Fox <pgf@brightstareng.com> | 2005-08-01 16:43:13 +0000 |
commit | 41a72ecd1936bc0b4ae75c723c88129bb01928ff (patch) | |
tree | e051b9b4fceba69fb263e28a7275b3feb480d6e7 /init/init.c | |
parent | 79c142d93847c168b825858f4e372e10c7e32906 (diff) | |
download | busybox-w32-41a72ecd1936bc0b4ae75c723c88129bb01928ff.tar.gz busybox-w32-41a72ecd1936bc0b4ae75c723c88129bb01928ff.tar.bz2 busybox-w32-41a72ecd1936bc0b4ae75c723c88129bb01928ff.zip |
applying patch from bug 24:
0000024 03-16-05 patch: allow init to set controlling tty
Diffstat (limited to 'init/init.c')
-rw-r--r-- | init/init.c | 7 |
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__) |