> -----Original Message-----
> From: Chris January [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 10, 2002 9:57 PM
> To: [EMAIL PROTECTED]
> Subject: REPOST: unlink semantics
>
>
> With respect to the 'Infinte Loop in "rm -fr"' thread, I
> believe the current semantics of unlink on Cygwin to be
> inconsistent with SuSv2.
>
> SuSv2 specifies the following:
SuS assumes files can be removed/deleted while in use.
> Cygwin's current implementation of unlink is not consistent
> with the following part: "If one or more processes have the
> file open when the last link is removed, the link will be
> removed before unlink() returns, but the removal of the file
> contents will be postponed until all references to the file
> are closed." At present Cygwin delays not only the removal of
> the file contents, but also the removal of the link (i.e. the
> directory entry).
Patches to correct this gratefully accepted. Don't forget to test on
win9x and NT4. Also be sure to test what happens when you delete a .dll
out from under a program on win9x.
> As a suggested fix, path_conv::check could
> returns ENOENT for a file if it appears in the delqueue.
This introduces it's own problems: what happens when the application
then tries to create a new file with that file name? Do we give it a
random temporary name? What happens when the app then calls a non-cygwin
program with the file name.... oops!
Anyway, food for thought.
Rob
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/