Re: file monitored by kqueue isn't deleted
Re: file monitored by kqueue isn't deleted
- Subject: Re: file monitored by kqueue isn't deleted
- From: "M. Uli Kusterer" <email@hidden>
- Date: Fri, 15 Oct 2004 23:02:15 +0200
At 13:05 Uhr -0700 15.10.2004, Eric Ocean wrote:
Here's the problem: the file Illustrator renamed is never removed. I
know Illustrator is calling unlink() after the rename, because
that's what causes the delete notification to be sent according to
the kqueue man page. However, after I terminate my program, the file
remains.
Well, that the file remains *after* you quit your program is kinda
weird. While going over the code of UKKQueue again to find out
whether it was something I did, I found out that UKKQueue's -dealloc
didn't close the file descriptors, though it probably should. I just
put up a fixed version at:
http://www.zathras.de/programming/sourcecode.htm
However, the OS should automatically close all files opened by a
particular application when it quits, so the behavior you're seeing
should be impossible as far as I know.
Oh, and by the way: If you want to manually unlink your file, you
should be able to use the path UKKQueue gives you with the
notification. The file path is the object of the notification, or if
you've registered a delegate, it is passed as the second argument.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden