[Top][All Lists]

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

Re: bash crashes with named pipes

From: Chet Ramey
Subject: Re: bash crashes with named pipes
Date: Thu, 09 Dec 2010 15:36:56 -0500
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv: Gecko/20101027 Thunderbird/3.1.6

On 6/11/10 5:10 PM, Kevin wrote:
> Maybe I'm doing something wrong, but the following will make bash
> crash.
> terminal 2:
> $ mkfifo test
> $ while true; do echo foo && sleep 1; done > test
> terminal 1:
> $ <test cat
> wait for a few "foo"s to be printed and then kill with ctrl-c
> terminal 2 will read:
> Warning: Program '/bin/bash' crashed.

Bash gets a SIGPIPE and exits, since that's a fatal signal.  The question
is whether it should try and figure out whether the file it's writing to
is a pipe and catch and discard SIGPIPE if so.

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

reply via email to

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