From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13701 invoked by alias); 23 Jun 2014 13:57:17 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 13432 invoked by uid 89); 23 Jun 2014 13:57:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mpv2.tis.cwru.edu Received: from mpv2.tis.CWRU.Edu (HELO mpv2.tis.cwru.edu) (129.22.105.37) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (DES-CBC3-SHA encrypted) ESMTPS; Mon, 23 Jun 2014 13:57:12 +0000 Received: from mpv5.tis.CWRU.Edu (EHLO mpv5.cwru.edu) ([129.22.105.51]) by mpv2.tis.cwru.edu (MOS 4.3.5-GA FastPath queued) with ESMTP id BGH00971; Mon, 23 Jun 2014 09:57:08 -0400 (EDT) Received: from caleb.INS.CWRU.Edu (EHLO caleb.ins.cwru.edu) ([129.22.8.211]) by mpv5.cwru.edu (MOS 4.3.5-GA FastPath queued) with ESMTP id AXU06229 (AUTH cpr); Mon, 23 Jun 2014 09:57:01 -0400 (EDT) Message-ID: <53A8322D.3010703@case.edu> Date: Mon, 23 Jun 2014 13:57:00 -0000 From: Chet Ramey Reply-To: chet.ramey@case.edu User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Chen Gang CC: chet.ramey@case.edu, Andreas Schwab , palves@redhat.com, gdb-patches@sourceware.org, binutils@sourceware.org, bug-readline@gnu.org, amodra@gmail.com Subject: Re: [Bug-readline] [PATCH] readline/histfile.c: Check and retry write() operation in history_truncate_file() References: <5397C077.1080702@gmail.com> <53A1F78A.8020508@case.edu> <53A23D77.1040905@gmail.com> <53A3F78E.6020803@gmail.com> <53A4AD62.6020408@case.edu> <53A4ED1B.2060608@gmail.com> <53A612EF.9070400@case.edu> <53A638EF.6050700@gmail.com> In-Reply-To: <53A638EF.6050700@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Junkmail-Whitelist: YES (by domain whitelist at mpv2.tis.cwru.edu) X-SW-Source: 2014-06/txt/msg00813.txt.bz2 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/