This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: unlink(2) or fopen(3) failing under cygwin
- From: "Hannu E K Nevalainen" <garbage_collector at telia dot com>
- To: <cygwin at cygwin dot com>
- Date: Tue, 23 Mar 2004 19:51:39 +0100
- Subject: RE: unlink(2) or fopen(3) failing under cygwin
> -----Original Message-----
> From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com]On Behalf
> Of Blair P.Houghton
> Sent: Tuesday, March 23, 2004 5:45 PM
> To: cygwin@cygwin.com
> Subject: unlink(2) or fopen(3) failing under cygwin
>
>
> I forget. What's the command to dump the system config?
>
> Here's what `uname -a' says:
>
> CYGWIN_NT-5.1 eMachine64-3000 1.5.7(0.109/3/2) \
> 2004-01-30 19:32 i686 unknown unknown Cygwin
>
> unlink(2) seems to be causing a subsequent fopen(3)
> to fail. Originally, it was the unlink call that
> failed, but putting it in a loop
>
> while(!unlink(...))
>
> made it work.
>
> Does anyone know of any reason an fopen on the
> just-unlinked file would fail under Cygwin?
IIRC this has been up earlier; unlink() isn't atomic.
Search the archives:
google("site:cygwin.com inurl:ml +atomic +unlink")
might be a good start I guess.
/Hannu E K Nevalainen, B.Sc. EE - 59+16.37'N, 17+12.60'E
** on a mailing list; please keep replies on that particular list **
-- printf("LocalTime: UTC+%02d\n",(DST)? 2:1); --
--END OF MESSAGE--
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/