From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27820 invoked by alias); 12 Jan 2017 16:38:16 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 27810 invoked by uid 89); 12 Jan 2017 16:38:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=ATM, atm, respond X-HELO: mail-io0-f175.google.com Received: from mail-io0-f175.google.com (HELO mail-io0-f175.google.com) (209.85.223.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 12 Jan 2017 16:38:14 +0000 Received: by mail-io0-f175.google.com with SMTP id l66so22675313ioi.1 for ; Thu, 12 Jan 2017 08:38:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=cMEzpiu3UwNA8F+Eui9q3lsXGerKUAZwtfL1BHwnkf8=; b=pm3xW9BqLdY0iPHcm8plbJ6vHnYMIRv/A6l5N7tKPS3hgtiMKvsm+pXVv+QgpXWptB P1y6Saz9YeuI0lZCGIw3UdxGZNegzu8eQKjsnjAzDO1Pj8Fmk+FR37pM9ZPe+pth4cyE yhq8HVB+iCWLPwLrrmyUDZtNiPETIMVg7cAQd+o1MQKtadoQB2H8diUlKLBZWiN+v3Iq /fyK5kmFOENkb+L1Ii6WCWgplP1rd33eOea6wbOKC3bTdBf4G1MA7tg78JEOJ5FX+tC+ PEa21haUfBWcBCYrafVYcFVdg/k479t6QY7Yue9nmDcUEYhN5ZKV8rG8+evVuzewzX9z Enbg== X-Gm-Message-State: AIkVDXIBGE1eGKa8wuwl0q7wg5+CRlaDD6BSwuEYnQX6UsaE1Bmfnuh5WKfzZXdqyLbvyg== X-Received: by 10.107.18.12 with SMTP id a12mr16211343ioj.155.1484239092426; Thu, 12 Jan 2017 08:38:12 -0800 (PST) Received: from [192.168.0.6] (d27-96-48-76.nap.wideopenwest.com. [96.27.76.48]) by smtp.gmail.com with ESMTPSA id j201sm1298685ita.20.2017.01.12.08.38.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jan 2017 08:38:11 -0800 (PST) Subject: Re: rename() cannot replace the file which is opened with writable access To: cygwin@cygwin.com References: <20170112.234135.194683198576068158.trueroad@trueroad.jp> <0D835E9B9CD07F40A48423F80D3B5A704BBD9592@USA7109MB022.na.xerox.net> <20170112153619.GD12383@calimero.vinschen.de> From: cyg Simple Message-ID: <67bfbc05-82e8-4f35-67fa-9673d929490d@gmail.com> Date: Thu, 12 Jan 2017 16:38:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <20170112153619.GD12383@calimero.vinschen.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2017-01/txt/msg00124.txt.bz2 On 1/12/2017 10:36 AM, Corinna Vinschen wrote: > On Jan 12 15:30, Nellis, Kenneth (Conduent) wrote: >> From: Masamichi Hosoda >>> If I understand correctly, >>> POSIX behavior should be able to replace the writable opened file by >>> rename(). >>> But, It does not work on my Cygwin environment. >>> >>> Is it no problem if Cygwin's behavior is different from POSIX behavior? >>> If so, we need different application handling for Cygwin and POSIX. >> >> I thought it would be informative to respond by referring the OP >> to a section of the Cygwin User's Guide or FAQ that mentioned the >> limitations of Cygwin, but I could not find it. > > Needs debugging. Off the top of my head I have no clue why this > doesn't work. I'm just not near any Windows machine ATM... Possibly BLODA. In the sample code provided, the rename is trying to rename the open file to an existing filename that was recently (within microseconds) created. -- cyg Simple -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple