in reply to Re: Re: Determining if self is already running under WinNT/2000
in thread Determining if self is already running under WinNT/2000

Which release of perl is that (details)?

http://crazyinsomniac.perlmonk.org/perl/ppm
http://dada.perl.it


MJD says you can't just make shit up and expect the computer to know what you mean, retardo!
** The Third rule of perl club is a statement of fact: pod is sexy.

  • Comment on Re: Re: Re: Determining if self is already running under WinNT/2000

Replies are listed 'Best First'.
Re: Re: Re: Re: Determining if self is already running under WinNT/2000
by lrep (Novice) on Feb 10, 2003 at 19:11 UTC
    Here is the version info...

    C:\SRC\perl>c:/activeperl/bin/perl.exe -version

    This is perl, v5.6.1 built for MSWin32-x86-multi-thread
    (with 1 registered patch, see perl -V for more detail)

    Copyright 1987-2001, Larry Wall

    Binary build 633 provided by ActiveState Corp.
    http://www.ActiveState.com
    Built 21:33:05 Jun 17 2002

      Win32::Mutex works ok for using the same version perl as you?

      #! perl -slw use strict; use Win32::Mutex; #! backslashes are prohibited in mutex names (my $name = $0) =~ tr[\\][/]; my $mtx = Win32::Mutex->open($name); die "$0 is already running" if $mtx; $mtx = Win32::Mutex::->new(1,$name) or die $^E; print "process id: $$"; sleep 1000; __END__ c:\test>perl -v This is perl, v5.6.1 built for MSWin32-x86-multi-thread Binary build 633 provided by ActiveState Corp. http://www.ActiveState. +com ... c:\test>mutex process id: 200 ^C c:\test>^C c:\test>start /b mutex c:\test>process id: 218 mutex C:\test\mutex.pl is already running at C:\test\mutex.pl line 7. c:\test>kill 218 c:\test>mutex process id: 271 ^C c:\test>^C

      Examine what is said, not who speaks.

      The 7th Rule of perl club is -- pearl clubs are easily damaged. Use a diamond club instead.