in reply to Determining if self is already running under WinNT/2000
#!/usr/bin/perl use strict; use warnings; use Win32::Mutex; my $mutex = Win32::Mutex->new(1, 'mutex.pl'); my $return = $mutex->wait(0); die "already running" unless $return; while (1){ exit if <> }
theorbtwo is right that it's not portable - but it is the "Windows®" way of doing this.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Determining if self is already running under WinNT/2000
by Anonymous Monk on Feb 06, 2003 at 23:38 UTC | |
by PodMaster (Abbot) on Feb 07, 2003 at 05:19 UTC | |
by lrep (Novice) on Feb 10, 2003 at 19:11 UTC | |
by BrowserUk (Patriarch) on Feb 11, 2003 at 00:15 UTC |