On 12/28/11 5:57 PM, Philip wrote:

> So without job control bash might (I know, we don't know for sure)
> send the SIGHUP to all processes started in the shell, whether child
> by definition or not?
No, it doesn't.

> Shouldn't the -i flag enable job control by the way?

Yes, and it does.  The problem is that bash inappropriately turns job
control off if -i is supplied with a shell script.  I've attached a
patch that fixes that.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/
*** ../bash-4.2-patched/shell.c	2011-01-02 16:04:51.000000000 -0500
--- shell.c	2011-12-29 09:18:52.000000000 -0500
***************
*** 1620,1624 ****
    no_line_editing = 1;
  #if defined (JOB_CONTROL)
!   set_job_control (0);
  #endif /* JOB_CONTROL */
  }
--- 1620,1626 ----
    no_line_editing = 1;
  #if defined (JOB_CONTROL)
!   /* Even if the shell is not interactive, enable job control if the -i or
!      -m option is supplied at startup. */
!   set_job_control (forced_interactive||jobs_m_flag);
  #endif /* JOB_CONTROL */
  }

Reply via email to