Re: At most 1 running copy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 26 Nov 2004 21:34:11 -0500, Doug Stewart <dstewart@xxxxxxxxxxxx> wrote:
> Ed Wilts wrote:
> It might be a better idea to simply write out a "lockfile" and check for
> its presence before running.

One technique we used back in the days of C-News was to make a
lockfile.$PID.  You then tried to create a HARD link (not a symlink)
from lockfile.$PID to lockfile.  The link call was guaranteed to be
atomic, failing if lockfile already existed.


-- 
 "To announce that there must be no criticism of the president, or that we
are to stand by the president, right or wrong, is not only unpatriotic and
servile, but is morally treasonable to the American public." -- Teddy Roosevelt


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux