applying patch from bug 24:
0000024 03-16-05 patch: allow init to set controlling tty
This commit is contained in:
parent
79c142d938
commit
41a72ecd19
2 changed files with 18 additions and 0 deletions
|
@ -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__)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue