bug-readline
[Top][All Lists]
Advanced

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

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


From: Chen Gang
Subject: Re: [Bug-readline] [PATCH] readline/histfile.c: Check and retry write() operation in history_truncate_file()
Date: Thu, 19 Jun 2014 09:31:35 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0


On 06/19/2014 04:33 AM, Chet Ramey wrote:
> On 6/10/14, 10:35 PM, Chen Gang wrote:
>> For regular file, write() operation may also fail, so check it too. If
>> write() return 0, can simply wait and try again, it should not suspend
>> infinitely if environments have no critical issues.
> 
> Readline-6.3 checks the return value from write() and returns a non-zero
> value to the history_truncate_file caller.  I really don't think that
> waiting forever if write continues to return 0 is a great idea; an error
> return is enough to let the caller deal with it.
> 

That sounds fine to me, and I will send patch v2 for it. And excuse me,
I have to do some other things today, so I shall try to send it within 2
days (within 2014-06-21) -- if it is too late, please help send it.


Thanks.
-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed



reply via email to

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