bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bizarre trap behavior while reading a file


From: Chet Ramey
Subject: Re: bizarre trap behavior while reading a file
Date: Mon, 28 Mar 2011 10:20:14 -0400
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.14) Gecko/20110221 Thunderbird/3.1.8

On 3/28/11 9:59 AM, tytus64 wrote:
> 
> Interesting... 
> I used kill -HUP <pid> instead of killall -HUP <prog_name> and it works
> without interrupting the first loop. I also noticed 2 processes running when
> the first loop is iterating but only 1 when the second loop is iterating:

There is a bash process that is forked to execute the `while read ...'
in the first pipeline loop.  It has to hang around the whole time, so it
can run the while loop and exit with the correct status.  If you send it
a SIGHUP with `killall bash', it will exit.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]