in reply to Windows process

Win32::Mutex sounds like a simple and appropriate solution. If you end up using File::Flock, beware of the case where a file exists after an abnormal termination of a process. That is, where there is a file and no process.

Yet another approach is to use Tie::Registry to store the process id of the process in the Registry when it starts. The pseudo code would be something like this:

if the key is in the registry and that process (value of the key) is still running, exit put the processid of the current process in the registry, creating the key if necessary "rest of program"
HTH, --traveler

Replies are listed 'Best First'.
Re^2: Windows process
by astroboy (Chaplain) on Sep 17, 2004 at 23:20 UTC
    Re: flock. But if the process dies, surely the lock is released from the file, so it doesn't matter if the lock file is left behind