On 2/22/15 5:57 PM, gregrwm wrote:
> On Feb 13, 2015 7:38 AM, "Chet Ramey" <[email protected]
> <mailto:[email protected]>> 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 [email protected] http://cnswww.cns.cwru.edu/~chet/