Re: nested bash 5 interactive sessions without job control

2019-02-19 Thread Chet Ramey
On 2/19/19 7:31 PM, Grisha Levit wrote: > -c "($BASH --norc -i -c 'set +m; exec /; set -m; \$(:)')" Thanks, I was able to reproduce it with this. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc.

Re: nested bash 5 interactive sessions without job control

2019-02-19 Thread Grisha Levit
On Tue, Feb 19, 2019, 7:28 PM Chet Ramey wrote: > I can't reproduce this on my Mac OS X box when I run the devel version > as a login shell and ssh to localhost. > I was also able to get the same result with $BASH -c "($BASH --norc -i -c 'set +m; exec /; set -m; \$(:)')" >

Re: nested bash 5 interactive sessions without job control

2019-02-19 Thread Chet Ramey
On 2/18/19 12:55 PM, Grisha Levit wrote: > On Sun, Feb 17, 2019 at 8:23 PM Chet Ramey wrote: >> Thanks for the report. I'll fix it in the next devel branch push. > > One more corner case, only shows up when bash is started by `login`: > > $ set +m; exec / > -bash: /: Is a directory > -bash: exec

Re: nested bash 5 interactive sessions without job control

2019-02-18 Thread Grisha Levit
After. Prior to today's push bash just hangs after `exec /`. Also I tested only on OSX, setting my login shell to the newly built bash and setting iTerm/Terminal.app to use the login shell.

Re: nested bash 5 interactive sessions without job control

2019-02-18 Thread Chet Ramey
On 2/18/19 12:55 PM, Grisha Levit wrote: > On Sun, Feb 17, 2019 at 8:23 PM Chet Ramey wrote: >> Thanks for the report. I'll fix it in the next devel branch push. > > One more corner case, only shows up when bash is started by `login`: > > $ set +m; exec / > -bash: /: Is a directory > -bash: exec

Re: nested bash 5 interactive sessions without job control

2019-02-18 Thread Grisha Levit
On Sun, Feb 17, 2019 at 8:23 PM Chet Ramey wrote: > Thanks for the report. I'll fix it in the next devel branch push. One more corner case, only shows up when bash is started by `login`: $ set +m; exec / -bash: /: Is a directory -bash: exec: /: cannot execute: Is a directory $ echo "$(ps -o pid,

Re: nested bash 5 interactive sessions without job control

2019-02-17 Thread Chet Ramey
On 2/15/19 9:43 PM, Grisha Levit wrote: > When in an interactive shell with job control disabled, starting > another interactive shell, disabling job control, and then exiting, > causes the parent shell to exit after any key press. > > bash-5.0$ set +m; $BASH --norc -i -c 'set +m' > bash-5.0$ [any

Re: nested bash 5 interactive sessions without job control

2019-02-15 Thread Grisha Levit
Above appears to have been introduced in https://git.savannah.gnu.org/cgit/bash.git/diff/jobs.c?h=devel&id=ee88838cf9421e2e40a7b7969cdf78a0010b075c P.S. a similar thing happens (not resolved by reverting the above) with: set +m; $BASH --norc -i -c 'exec xxx' where "xxx" is not a valid comman

Re: nested bash 5 interactive sessions without job control

2019-02-15 Thread Grisha Levit
Looks like the controlling process group isn't being reset correctly after the "inner" bash exits: $ trap 'echo "$(ps -o pid,tpgid -p $$)"' EXIT $ echo $$ 54581 $ set +m $ $BASH --norc -i -c 'set +m; echo $$' 54583 $ exit PID TPGID 54581 54583

nested bash 5 interactive sessions without job control

2019-02-15 Thread Grisha Levit
When in an interactive shell with job control disabled, starting another interactive shell, disabling job control, and then exiting, causes the parent shell to exit after any key press. bash-5.0$ set +m; $BASH --norc -i -c 'set +m' bash-5.0$ [any key] exit This seems to work fine in bash 4.4 and