bug-bash
[Top][All Lists]
Advanced

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

Re: history EINTR bug


From: Chet Ramey
Subject: Re: history EINTR bug
Date: Sun, 22 Feb 2015 20:57:26 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 2/22/15 5:57 PM, gregrwm wrote:
> On Feb 13, 2015 7:38 AM, "Chet Ramey" <chet.ramey@case.edu
> <mailto:chet.ramey@case.edu>> wrote:
>> On 2/12/15 9:06 AM, gregrwm wrote:
>> > i now suspect bash does not properly handle EINTR while handling history.
>>
>> Maybe.  There's not enough information here to say.
>>
>> > this just happened:
>> > bash: history: write error: Interrupted system call
>>
>> What command did you use?
> 
> history|&less

The most likely possibility is that you quit out of less before `history'
wrote enough data to cause stdio to flush its output buffer and the SIGPIPE
interrupted the write(2) when it did.  I'm not sure why write would return
-1/EINTR instead of -1/EPIPE, but behavior is not consistent across
platforms.

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