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 [email protected] http://cnswww.cns.cwru.edu/~chet/