public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: cyg Simple <cygsimple@gmail.com>
To: cygwin@cygwin.com
Subject: Re: rename() cannot replace the file which is opened with writable access
Date: Thu, 12 Jan 2017 16:38:00 -0000	[thread overview]
Message-ID: <67bfbc05-82e8-4f35-67fa-9673d929490d@gmail.com> (raw)
In-Reply-To: <20170112153619.GD12383@calimero.vinschen.de>

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

  reply	other threads:[~2017-01-12 16:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-12  0:07 Masamichi Hosoda
2017-01-12  5:50 ` Andrey Repin
2017-01-12 14:41   ` Masamichi Hosoda
2017-01-12 15:30     ` Nellis, Kenneth (Conduent)
2017-01-12 15:36       ` Corinna Vinschen
2017-01-12 16:38         ` cyg Simple [this message]
2017-01-12 19:06 ` L. A. Walsh
2017-01-12 21:49 ` Corinna Vinschen
2017-01-14  4:00   ` Masamichi Hosoda
2017-01-14 15:38     ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=67bfbc05-82e8-4f35-67fa-9673d929490d@gmail.com \
    --to=cygsimple@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).