From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21753 invoked by alias); 10 Jan 2015 16:03:22 -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 21742 invoked by uid 89); 10 Jan 2015 16:03:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout28.012.net.il Received: from mtaout28.012.net.il (HELO mtaout28.012.net.il) (80.179.55.184) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 10 Jan 2015 16:03:20 +0000 Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NHY00A00XK6KD00@mtaout28.012.net.il> for gdb-patches@sourceware.org; Sat, 10 Jan 2015 18:01:16 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NHY007WXXU37X30@mtaout28.012.net.il>; Sat, 10 Jan 2015 18:01:16 +0200 (IST) Date: Sat, 10 Jan 2015 16:03:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH] Append to input history file instead of overwriting it In-reply-to: To: Patrick Palka Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83twzy62t5.fsf@gnu.org> References: <1420903108-24831-1-git-send-email-patrick@parcs.ath.cx> <83wq4u63wu.fsf@gnu.org> X-IsSubscribed: yes X-SW-Source: 2015-01/txt/msg00261.txt.bz2 > From: Patrick Palka > Date: Sat, 10 Jan 2015 10:48:03 -0500 > Cc: gdb-patches@sourceware.org > > > On Windows, a call to 'rename' fails if the destination already > > exists. Does the logic here cope with that? > > Hmm, the logic does not really cope with Windows' behavior here, > because the above warning should only get emitted for unexpected > failures. So I suppose we should only emit the above warning if errno > != EBUSY (perhaps only on Windows systems)? Why EBUSY? We could also explicitly remove the target before the rename call (and ignore any errors from that), which will make it work like on Posix systems.