This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [Bug-readline] [PATCH] readline/histfile.c: Check and retry write() operation in history_truncate_file()
- From: Chet Ramey <chet dot ramey at case dot edu>
- To: Chen Gang <gang dot chen dot 5i5j at gmail dot com>
- Cc: chet dot ramey at case dot edu, Andreas Schwab <schwab at linux-m68k dot org>, palves at redhat dot com, gdb-patches at sourceware dot org, binutils at sourceware dot org, bug-readline at gnu dot org, amodra at gmail dot com
- Date: Mon, 23 Jun 2014 09:57:01 -0400
- Subject: Re: [Bug-readline] [PATCH] readline/histfile.c: Check and retry write() operation in history_truncate_file()
- Authentication-results: sourceware.org; auth=none
- References: <5397C077 dot 1080702 at gmail dot com> <53A1F78A dot 8020508 at case dot edu> <53A23D77 dot 1040905 at gmail dot com> <53A3F78E dot 6020803 at gmail dot com> <53A4AD62 dot 6020408 at case dot edu> <53A4ED1B dot 2060608 at gmail dot com> <53A612EF dot 9070400 at case dot edu> <53A638EF dot 6050700 at gmail dot com>
- Reply-to: chet dot ramey at case dot edu
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/