diff options
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__) |