busybox/init
Eric Andersen 3c8064ff69 Daniel writes:
I've found a problem with job control when the init process is restarted.

If the system boots for the first time, I get job control on a serial terminal -
no problems. However, when I restart init by issuing "init -q", then the shell
no longer has job control.

I traced this a problem in console_init in the file init.c. What was happening
after the restart is that the first compare

    if (ioctl(0, TIOCGSERIAL, &sr) == 0) {
	...
    } else if (ioctl(0, VT_GETSTATE, &vt) == 0) {
	...
    } else {
	... // assume /dev/console
    }

returned error and subsequently the code assumes /dev/console as the console,
which does not support job control.

Checking the errno after the first call showed that the system was complaining
about the file descriptor. This is probably because the previous init process
had closed all its file descriptors which the new init process had inherited.
2003-07-05 08:29:01 +00:00
..
Config.in Patch from Kent Robotti adding a bunch of needed docs! 2003-07-05 07:52:35 +00:00
halt.c Apply last_patch93 from vodz: 2003-06-27 17:08:15 +00:00
init_shared.c Apply last_patch93 from vodz: 2003-06-27 17:08:15 +00:00
init_shared.h Apply last_patch93 from vodz: 2003-06-27 17:08:15 +00:00
init.c Daniel writes: 2003-07-05 08:29:01 +00:00
Makefile Completely rework the config system so that it no longer annoys me to work on 2002-04-12 12:05:57 +00:00
Makefile.in Apply last_patch93 from vodz: 2003-06-27 17:08:15 +00:00
mesg.c Major coreutils update. 2003-03-19 09:13:01 +00:00
minit.c minit, a Minimal init system. 2003-05-11 14:52:39 +00:00
msvc.c minit, a Minimal init system. 2003-05-11 14:52:39 +00:00
pidfilehack.c minit, a Minimal init system. 2003-05-11 14:52:39 +00:00
poweroff.c Apply last_patch93 from vodz: 2003-06-27 17:08:15 +00:00
reboot.c Apply last_patch93 from vodz: 2003-06-27 17:08:15 +00:00
start_stop_daemon.c Major coreutils update. 2003-03-19 09:13:01 +00:00