Re: Failed exec resets job control state

2019-02-17 Thread Chet Ramey
On 2/15/19 7:32 PM, Grisha Levit wrote: > An `exec` that can't execute the supplied command seems to cause the > status of job control to become reset to the default state: > >$ bash -O execfail -mc 'echo $-; exec xxx; echo $-' >hmBc >bash: line 0: exec: xxx: not found >hBc > >

Failed exec resets job control state

2019-02-15 Thread Grisha Levit
An `exec` that can't execute the supplied command seems to cause the status of job control to become reset to the default state: $ bash -O execfail -mc 'echo $-; exec xxx; echo $-' hmBc bash: line 0: exec: xxx: not found hBc $ set +m; echo $- hiBHs $ exec xxx bash: exec: x