On 2/28/14, 12:00 PM, Eduardo A. Bustamante López wrote:
> This works fine:
>
> dualbus@debian:~$ ~/local/bin/bash -s <<< 'for i in . .; do (~/local/bin/bash
> -mic ": & wait") ; done'
> [1] 1629
> [1]+ Done :
> [1] 1631
> [1]+ Done :
>
> -----
> This does not:
>
> dualbus@debian:~$ ~/local/bin/bash -s <<< 'for i in . .; do (~/local/bin/bash
> -mc ": & wait") ; done'
> [1]+ Done :
>
> [1]+ Stopped ~/local/bin/bash -s <<< 'for i in . .; do
> (~/local/bin/bash -mc ": & wait") ; done'
>
Thanks for the report. Pointing out the behavior difference between the
first case (using -i) and the second (without) was the key. Here's a
patch.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/
*** ../bash-4.3/jobs.c 2014-01-10 09:05:34.000000000 -0500
--- jobs.c 2014-03-02 18:05:09.000000000 -0500
***************
*** 4375,4379 ****
end_job_control ()
{
! if (interactive_shell) /* XXX - should it be interactive? */
{
terminate_stopped_jobs ();
--- 4375,4379 ----
end_job_control ()
{
! if (interactive_shell || job_control) /* XXX - should it be just job_control? */
{
terminate_stopped_jobs ();