bug-bash
[Top][All Lists]
Advanced

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

Re: bash incorrectly handles 'echo' + SIGPIPE under some situations on L


From: Chet Ramey
Subject: Re: bash incorrectly handles 'echo' + SIGPIPE under some situations on Linux
Date: Thu, 7 Jan 2016 08:55:43 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.5.0

On 1/6/16 11:43 AM, Chris Siebenmann wrote:

>> Adding a call to fpurge() to discard buffered output on stdout before
>> dup2() replaces file descriptor 1 in the child process fixes it.
> 
>  Note that the problem isn't only in the children; the parent process
> itself has a problem too, as the 'final' by itself should not be printed
> either (and comes entirely from the parent).

Thanks.  This is a slightly different problem that manifests itself in
different ways on other platforms (Mac OS X).  I have a fix for this, too.

Chet

-- 
``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]