in reply to Re^3: Abort if instance already running?
in thread Abort if instance already running?

Even without multiple hosts, also knowing the lockfile technique is worthwhile as it is more easily adaptable to represent other assets. That a lockfile must be cleaned up is an advantage in that situation. The ephemeral (crash) and expensive (proc-table) nature of a process work against you.

That the process is both the contender and the symbol of contention hinders splitting out functionality into a separate administrative program.

Under linux /var/lock is the place for lockfiles.

Be well,
rir