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 11:39 AM, tytus64 wrote:
>> 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.
>>
>
> Thanks for all the answers. I think I understand the problem now. I wonder
> though if there is any way to disable default HUP handling int the
> subprocess executing the loop?
Sure. Trap it to SIG_IGN: `trap "" SIGHUP'.
--
``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/