I'm reading the source code init.c of sysvinit(now replaced by Systemd), in the function
spawn()
(where init
creates subprocesses), there is a comment at line 1165:
/*
* In sysinit, boot, bootwait or single user mode:
* for any wait-type subprocess we _force_ the console
* to be its controlling tty.
*/
But I'm still not understand it. Could anyone explains the reason in more detail?