On 9/9/16 2:00 PM, Matthew Giassa wrote:
> Good day,
> 
> I've been doing some testing with the bash-prexec script which uses a
> DEBUG trap to issue user-supplied functions before executing each
> command (https://github.com/rcaloras/bash-preexec). 
> 
> Here is a minimal working example
> (https://github.com/rcaloras/bash-preexec/issues/25) which causes
> background subshells to kill the current session:
> 
> # Causes login shells to logout
> # Look like bash versions > 4.2.46
> set -o functrace > /dev/null 2>&1
> no_op() { :;}
> trap 'no_op' DEBUG;
> # Any command in a subshell and background
> ( pwd ) & 
> 
> Is this a bug or issue in BASh itself, or is it simply a limitation of
> using pre-exec functionality?

I will look at this after bash-4.4 is released.  If it's a bug with bash,
it's probably bash setting the terminal process group incorrectly when
running the DEBUG trap.

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/

Reply via email to