diff options
author | Paul Fox | 2005-08-01 16:43:13 +0000 |
---|---|---|
committer | Paul Fox | 2005-08-01 16:43:13 +0000 |
commit | 41a72ecd1936bc0b4ae75c723c88129bb01928ff (patch) | |
tree | e051b9b4fceba69fb263e28a7275b3feb480d6e7 /init/init.c | |
parent | 79c142d93847c168b825858f4e372e10c7e32906 (diff) | |
download | busybox-41a72ecd1936bc0b4ae75c723c88129bb01928ff.zip busybox-41a72ecd1936bc0b4ae75c723c88129bb01928ff.tar.gz |
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 8687b10..0f49a45 100644 --- a/init/init.c +++ b/init/init.c @@ -577,6 +577,13 @@ static pid_t run(const struct init_action *a) cmd[0][0] = '-'; strcpy(cmd[0] + 1, s); } +#ifdef CONFIG_FEATURE_INIT_SCTTY + /* Establish this process as session leader and + * (attempt) to make the tty (if any) a controlling tty. + */ + (void) setsid(); + (void) ioctl(0, TIOCSCTTY, 0/*don't steal it*/); +#endif } #if !defined(__UCLIBC__) || defined(__ARCH_HAS_MMU__) |