Re: [Bug-readline] [PATCH] readline/histfile.c: Check and retry write() operation in history_truncate_file()

Chet Ramey
2014-06-23T13:57:17Z

On 6/21/14, 10:01 PM, Chen Gang wrote:

>> history_truncate_file will never return -1.
>>
>
> Hmm... do you mean:
>
> "for regular file, write() never return 0, if parameter 'count' > 0?"
>
> or
>
> "if write() return 0, can also return 0 to history_truncate_file()?".

Both of those things are true, but neither is what I said above.

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