Re: rename() cannot replace the file which is opened with writable access

2017-01-14 Thread Corinna Vinschen
On Jan 14 13:00, Masamichi Hosoda wrote: > >> I've found that rename() cannot replace the file > >> which is opened with writable access on Cygwin. > >> On Linux, it works. > >> > >> If I understand correctly, it should work under POSIX. > >> > >> Here's sample code for reproduce. > > > >

Re: rename() cannot replace the file which is opened with writable access

2017-01-13 Thread Masamichi Hosoda
>> I've found that rename() cannot replace the file >> which is opened with writable access on Cygwin. >> On Linux, it works. >> >> If I understand correctly, it should work under POSIX. >> >> Here's sample code for reproduce. > > Thanks for the testcase. I applied a patch(*) and will upload a

Re: rename() cannot replace the file which is opened with writable access

2017-01-12 Thread Corinna Vinschen
On Jan 12 09:07, Masamichi Hosoda wrote: > Hello, > > I've found that rename() cannot replace the file > which is opened with writable access on Cygwin. > On Linux, it works. > > If I understand correctly, it should work under POSIX. > > Here's sample code for reproduce. Thanks for the

Re: rename() cannot replace the file which is opened with writable access

2017-01-12 Thread L. A. Walsh
Masamichi Hosoda wrote: Hello, I've found that rename() cannot replace the file which is opened with writable access on Cygwin. On Linux, it works. If I understand correctly, it should work under POSIX. Here's sample code for reproduce. --- #define OLDPATH "oldpath" #define NEWPATH

Re: rename() cannot replace the file which is opened with writable access

2017-01-12 Thread cyg Simple
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.

Re: rename() cannot replace the file which is opened with writable access

2017-01-12 Thread Corinna Vinschen
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

RE: rename() cannot replace the file which is opened with writable access

2017-01-12 Thread Nellis, Kenneth (Conduent)
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

Re: rename() cannot replace the file which is opened with writable access

2017-01-12 Thread Masamichi Hosoda
>> I've found that rename() cannot replace the file >> which is opened with writable access on Cygwin. >> On Linux, it works. > > It is OS dependent behavior, and vary even on same OS. > Windows may let you rename a file, or may not, depends on how exactly it is > opened. Thank you for your

Re: rename() cannot replace the file which is opened with writable access

2017-01-11 Thread Andrey Repin
Greetings, Masamichi Hosoda! > I've found that rename() cannot replace the file > which is opened with writable access on Cygwin. > On Linux, it works. It is OS dependent behavior, and vary even on same OS. Windows may let you rename a file, or may not, depends on how exactly it is opened. --