This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
Re: unlink
- From: Christopher Faylor <cgf at redhat dot com>
- To: cygwin-developers at cygwin dot com
- Date: Mon, 10 Mar 2003 11:16:28 -0500
- Subject: Re: unlink
- References: <3E6CB0FA.2312CCD0@ieee.org>
- Reply-to: cygwin-developers at cygwin dot com
On Mon, Mar 10, 2003 at 10:36:26AM -0500, Pierre A. Humblet wrote:
>Chris,
>
>It's a great idea to use FILE_FLAG_DELETE_ON_CLOSE for unlink,
>but a few bells rang when I read the code.
AFAIK, I didn't add anything here. I just changed the order. unlink
has always used FILE_FLAG_DELETE_ON_CLOSE.
>2) Why is wincap.has_delete_on_close needed?
>
>All Windows versions have delete_on_close capability. This is a snippet
>on WinME with a file on a shared directory mounted on Win98.
It doesn't work quite right on Windows 98. I tested it extensively a
while ago and it seemed unreliable. Maybe it is ok in the current incarnation.
I guess I could remove that test and see if anyone hollers.
>3) I don't understand why there are so many SetFileAttributes after CreateFile
> succeeds. If the file will be deleted, its attributes are don't care.
Think 'hard links'.
cgf