X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:subject:to:references:from:message-id:date
	:mime-version:in-reply-to:content-type
	:content-transfer-encoding; q=dns; s=default; b=Tvx7jtuRpWWCFSOo
	XVtawIwoxOOGfkJDu7EcBmMz0ivvA/bSIunWH4IZmgzo5EW8RwS/hVw0suJvns5f
	Lo0gVBIoXSej4wzSJsDoHrs1tZMtkBG+69RlCz8VHcrawHxrkxEorRR7+TOX5Umi
	8rthB7uZe/GXMzH3McezN0OXgfs=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:subject:to:references:from:message-id:date
	:mime-version:in-reply-to:content-type
	:content-transfer-encoding; s=default; bh=UGZKW/PV76wlnMR/CqV9ok
	3s59U=; b=F7Vf5GVDjap/Yck/oL2sGLm+IXRtWgHVnW5sIK6dhpbp+SvEC4S+jd
	4OLxQpNS+zMifcz5t8JF6boflMpGcEHSaKDx39cnsx8LCB9OIO62Vj2tvwaLNsjm
	w+OL4oIJ8Q0l5tVSCc0kmtKXZNavlR1b4kPQPOZEIg1bfPX8TuVv0=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
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
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)
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 <cygsimple@gmail.com>
Message-ID: <67bfbc05-82e8-4f35-67fa-9673d929490d@gmail.com>
Date: Thu, 12 Jan 2017 11:38:08 -0500
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

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

