This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: UNLINK problem (again!!)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Martine Carannante on 3/20/2009 10:06 AM:
> Hi
> 
> I kow that several persons have sent a mail concerning this problem, but
> unfortunately I don't see a clear solution in the mailing list.
> It seems to me very strange because  this kind of code happens very often .

Is this under cygwin 1.5 or 1.7?  It makes a difference, because the two
versions handle unlink() differently.  By default, Windows doesn't allow
deleting an open file (your code forgot to call fclose()).  Cygwin can
fake unlink() to make it appear that an open file has been deleted, but
the file still exists until it is closed, and depending on where the file
exists (which changes according to your cygwin version), the previous
existing file can be in the way of recreating a new file of the same name.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknDwA8ACgkQ84KuGfSFAYDwtACghwZxMNh4SpULRkCDZjaUeMx3
zvIAoL5DN4GTuOtXn+3e6poqp2ZuJM0I
=+qG1
-----END PGP SIGNATURE-----

--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]