That's what the tempname functions are for. So you don't have to
check the error and keep retrying. Especially if your goal is just to
call FSExchangeObjects in the end.
Ack, at 9/29/05, Scott Ribe said:
> FSCreateFileAndOpenForkUnicode doesn't addess steps 1 and 2. I
believe it is atomic w.r.t steps 2 and 3.
Why would you require atomicity with 1 & 2? Until the file is created, there
is no opportunity for an attacker to try to snag it and fill it in. Yes,
another process could inadvertently create a file with the same name, but
that's easy enough to handle by checking error return and retrying.
--
Sincerely,
Rosyna Keller
Technical Support/Holy Knight/Always needs a hug
Unsanity: Unsane Tools for Insanely Great People
It's either this, or imagining Phil Schiller in a thong.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden