in reply to Re: Determining if self is already running under WinNT/2000
in thread Determining if self is already running under WinNT/2000
Win32 has PIDs as usual, though they tend to be more annoying numbers, since they're really pointers into a kernel memory structure. IOW, you can use all the standard methods for dealing with this.
You can also use a Mutex kernel-object, which is the standard win32 way of dealing with it. See Win32::Mutex. This has the advantage of not creating files, and not having problems with the lockfiles of dead processes staying around. OTOH, it doesn't have the transparency that lockfiles/pidfiles do, and it's inherently nonportable.
|
|---|