On 5/11/17 6:24 AM, Geoff Clare wrote:

> In this situation, the shell started as $SHELL *is* the foreground
> command, which is why it gets the SIGINT.  The process groups it
> creates to run date and sleep are background process groups.  This
> is because the shell you are typing "$SHELL -c ..." in is the
> controlling process for the terminal session, not the one started
> as $SHELL.

In practice, it doesn't work exactly that way.  When monitor mode is
enabled, and the shell knows it is the process group leader of the
foreground process group, it is permitted to give the process groups it
creates access to the terminal. Most shells do that.

-- 
``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/

Reply via email to