Oystein Viggen <[EMAIL PROTECTED]> writes:
> * [Craig Allan Jeffree]
>
> >> old = open(".");
> >> chdir("foo);
> >> delete stuff
> >> fchdir(old);
> >> delete more stuff
> >>
> > Isn't this potentially racey as well?
You're right that one has to take more care when chdir:ing to "foo"
too. I was thinking about the chdir in the other direction. Here,
int old = open(".", ...);
chdir("foo"); /* Safe as long as we don't do anything in foo */
fchdir(old);
unlink("bar");
should be equivalent to simply
unlink("bar")
The same name in the same directory will be deleted, no matter if the
current directory or the foo subdirectory is moved around under our
feet.
/Niels
_______________________________________________
Help-hurd mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-hurd