Job control not working on ksh ------------------------------ Triggering: - Only effects shell launched from login. Subshells exempted. - exec'ing a new shell from the login shell, is still effected. - Occurs even when job monitoring (`set -o monitor`) reports being on. Demonstration: ``` perette@lenora ~ $ sleep 5 & [1] 4467 perette@lenora ~ $ fg %1 ksh: fg: No job control perette@lenora ~ $ sleep 5 & [1] 26065 perette@lenora ~ [subshell 2]$ fg %1 sleep 5 perette@lenora ~ [subshell 2]$ ``` Related: `` $ sleep 10 & $ disown %1 ksh: disown: No job control `` However, this works in a subshell unless job monitoring is disabled. When monitoring is disabled, ^Z interrupts jobs but job can not be re-enabled with %1 until a `set -o monitor` is performed. Then it can be done, even retroactively. Related 2: `set -o notify` has no effect. Jobs always report completion between commands, never immediately on command completion. Notes: misc.c contains 'bg' built-in code. It looks for SH_MONITOR option AND job.jobcontrol Stucture 'limits' contains variable posix_jobcontrol; comment indicates non-0 for job control Structure 'process' contains variable 'jobcontrol'; comment indicates "turned on" for real job control Job control not being enabled by job_init. :622 sets process group ID :623 set fails via e-perm, and goes into :625 tries to wait until its in foreground, skips out immediately (as expected) :637 Warning: endif (SIGTTIN) does not match #ifdef on :621 (SIGTSTP) :640 This block is skipped (NTTYDISC undefined on my system) :661 possible is still false from earlier so ...and thus we never get around to enabling job control (job.jobcontrol at :692). I don't have NTTYDISC so that whole block gets skipped, which puts us at...