Dmitry V. Levin wrote:
> Hi,
> 
> A "trap -p" output doesn't feed into a pipe:
> $ trap -p                                                                     
>                      
> $ trap "echo ..." EXIT                                                        
>                      
> $ trap -p EXIT                                                                
>                      
> trap -- 'echo ...' EXIT                                                       
>                                
> $ trap -p EXIT |wc -l                                                         
>                      
> 0                                                                             
>                                

Each element of a pipeline is run in a subshell.  Subshells don't
traps from their parent.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
                                                Live Strong.
Chet Ramey, ITS, CWRU    [EMAIL PROTECTED]    http://cnswww.cns.cwru.edu/~chet/


_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to