On Tue, May 08, 2018 at 03:12:45PM +0200, Seb wrote: > On Tue, May 08, 2018 at 12:49:40PM +0200, G.raud wrote: > > Hi, > > > $ mksh -m -c 'fg' > > mksh: fg: job control not enabled > > $ mksh -c 'set -m; fg' > > mksh: fg: %%: no such job > > There is indeed no job to get from the the process' background: > > $ mksh -c 'set -m; sleep 1 & fg' > \sleep 1
My goal here is to check when job control is enabled; case (2) is conform to the manpage as is your example; however case (1) is not hence the bug report. > > $ ksh -m -c 'xclock& sleep 2' > > ^Z[1] + Stopped ksh -m -c "xclock& sleep 2" > > $ # xclock is not refreshed > > $ fg > > Ctrl+Z sends a SIGTSTP (not a SIGSTOP) to the ksh's process > group, 'xclock' hence stops. Which proves that xclock is in the same process group as the shell, hence that job control is disabled contrary to what option -m should do. -- G.raud