[BusyBox] ash (with job control) doesn't leave tty the way it found it
Paul Whittaker
paw at si1.dod.gov.au
Sun Mar 14 02:07:11 UTC 2004
Package: busybox
Version: 1.00pre8
I am using a lightweight menu system (replimenu[.sf.net]) on my console,
which invokes "/bin/sh -i -c /bin/login", where /bin/sh and /bin/login
are busybox applets. /bin/sh is ash, with CONFIG_ASH_JOB_CONTROL=y as
the sole suboption. The shell of the user concerned (nobody) is also
/bin/sh (ash). When the user /bin/sh exits (and thereby login and its
parent sh), replimenu receives EIO when it tries to read from the terminal.
This used to work (in the 4 July 2003 snapshot of busybox pre-1.0
unstable I was using previously), and looking over the ash applet code I
found that exitshell() used to call setjobctl(0), but this has been
taken out. It seems to me that it ought to be put back in again, ie.
** busybox-1.00-pre8/shell/ash.c.orig 2004-03-05 09:09:10.000000000 +1100
--- busybox-1.00-pre8/shell/ash.c 2004-03-05 09:03:12.000000000 +1100
***************
*** 11857,11862 ****
--- 11857,11865 ----
evalstring(p);
}
flushall();
+ #ifdef CONFIG_ASH_JOB_CONTROL
+ setjobctl(0);
+ #endif
#ifdef CONFIG_FEATURE_COMMAND_SAVEHISTORY
if (iflag && rootshell) {
const char *hp = lookupvar("HISTFILE");
More information about the busybox
mailing list