Searching the web and books for information on this, I can't seem to
find a definitive yes or no to my question:

"Is there a portable way to do file locking?"

Some of the problems that are mentioned are that NFS systems make
almost everything non-atomic, locking methods often depend on fcntl
which is not available on all systems, and the dreaded race
condition when test and set are non-atomic.

Ruby can be used on the Mac, PC, and Unix, so I'm really after
something that portable.  I can't use a Mutex because I need this to
be exclusive across process boundaries (several invokations of the
program).

My searching suggests this is a common problem, but the answer to it
is rare!

        Thank you
        Hugh