[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple Routers Processing A Single Message

> Just in case you didn't catch it (in retrospect I wan't very explicit), the
> problem is that while one router process is trying to rename() (or
> link/unlink) a file, one or more other router processes can also rename()
> or link() it - yielding more than one router process that each think they
> have an exclusive copy.

Sorry guys, maybe I am missing something, but I always thought that link/
unlink/rename are all `atomic' on any normal UNIX.  So, if you renamed a
file to something private, no one would ever be able to rename it too.
If you are using link/unlink, you must check the result of unlink as well
as the result of link to be safe, if unlink returned ENOENT that means that
someone else has grabbed the file already and you should just drop your copy.