in reply to Re: use flock() to determine if other script is running
in thread use flock() to determine if other script is running

On platforms where flock is not supported, it's not a "fatal error". It won't even compile. So an eval-block won't work... you have to use an eval-string instead.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

  • Comment on •Re: Re: use flock() to determine if other script is running

Replies are listed 'Best First'.
Re: •Re: Re: use flock() to determine if other script is running
by Zaxo (Archbishop) on Aug 21, 2003 at 03:43 UTC

    Perhaps for VMS and suchlike, I don't know. On AS build 630 (perl 5.6.1)/Windows95, which does not support flock, my code gives:

    C:\download>perl -c flock.pl flock.pl syntax OK C:\download>perl flock.pl flock not supported! flock() unimplemented at flock.pl line
    at which point winders wrote off the edge of the screen and lost the line number ;-)

    My 'fatal error' jargon came directly from 'perldoc -f flock'.

    After Compline,
    Zaxo