[BusyBox] TAKE 2: Message on Startup: "sh: can't access tty; job control turned off"
Larry Doolittle
ldoolitt at recycle.lbl.gov
Tue Jan 7 15:41:03 UTC 2003
Guys -
Vladimir gave an ash patch, then said:
> But, "job control turned off" problem not solved - previous code
> have one iteration do while() loop.
> Current busybox have this problem only for serial console usage
> without getty/openvt(real, not bb).
> Kernel don`t set CTTY automaticaly for open(serail_console).
This BusyBox init defect appears is new for 0.60.5.
Reverting to init.c from 0.60.4 fixed it, so I could then
isolate the problem to a deleted ioctl(0, TIOCSCTTY, 0);
All the other changes to 0.60.5 are OK. So try the appended
patch, it works for me. I won't pretend to understand the
connection between this system call, the console, and the
lack of job control.
- Larry
--- init.c.orig Tue Jan 7 13:34:35 2003
+++ init.c Tue Jan 7 14:30:03 2003
@@ -507,6 +507,9 @@
_exit(1);
}
+ /* Always get a controlling tty */
+ ioctl(0, TIOCSCTTY, 0);
+
/* Make sure the terminal will act fairly normal for us */
set_term(0);
/* Setup stdout, stderr for the new process so
More information about the busybox
mailing list