[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-readline] [PATCH] readline/histfile.c: Check and retry write()
From: |
Chet Ramey |
Subject: |
Re: [Bug-readline] [PATCH] readline/histfile.c: Check and retry write() operation in history_truncate_file() |
Date: |
Wed, 18 Jun 2014 16:33:14 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
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.
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/
- [Bug-readline] [PATCH] readline/histfile.c: Check and retry write() operation in history_truncate_file(), Chen Gang, 2014/06/11
- Re: [Bug-readline] [PATCH] readline/histfile.c: Check and retry write() operation in history_truncate_file(),
Chet Ramey <=
- Re: [Bug-readline] [PATCH] readline/histfile.c: Check and retry write() operation in history_truncate_file(), Chen Gang, 2014/06/18
- Re: [Bug-readline] [PATCH] readline/histfile.c: Check and retry write() operation in history_truncate_file(), Chen Gang, 2014/06/20
- Re: [Bug-readline] [PATCH] readline/histfile.c: Check and retry write() operation in history_truncate_file(), Chet Ramey, 2014/06/20
- Re: [Bug-readline] [PATCH] readline/histfile.c: Check and retry write() operation in history_truncate_file(), Chen Gang, 2014/06/20
- Re: [Bug-readline] [PATCH] readline/histfile.c: Check and retry write() operation in history_truncate_file(), Chet Ramey, 2014/06/21
- Re: [Bug-readline] [PATCH] readline/histfile.c: Check and retry write() operation in history_truncate_file(), Chen Gang, 2014/06/21
- Re: [Bug-readline] [PATCH] readline/histfile.c: Check and retry write() operation in history_truncate_file(), Chet Ramey, 2014/06/23
- Re: [Bug-readline] [PATCH] readline/histfile.c: Check and retry write() operation in history_truncate_file(), Chen Gang, 2014/06/23
- Re: [Bug-readline] [PATCH] readline/histfile.c: Check and retry write() operation in history_truncate_file(), Chen Gang, 2014/06/25