On 12/2/16 1:20 AM, Clark Wang wrote: > Found the problem. The first "bash -i" changed the foreground pgrp to its > own pgrp at startup but did not restore the original foreground pgrp when > it exited. The following patch (not a real fix) works for me: > > --- a/shell.c > +++ b/shell.c > @@ -1504,6 +1504,7 @@ open_shell_script (script_name) > { > e = errno; > file_error (filename); > + end_job_control (); > sh_exit ((e == ENOENT) ? EX_NOTFOUND : EX_NOINPUT); > }
Nice catch and fix. There are a couple of other places you need to make this change, but it's the right fix. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/