RE: Re: Ensure only one instance of a script is running

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[snip]
> Unluckily, this will not prevent a race condition.  The only 
> file operations that are guaranteed to be atomic are mkdir() 
> and symlink(). Try to create the directory and see if it 
> fails.  Also remember to rmdir() the lock directory before exiting

How about grabbing the output from `ps -ax` and looping thourhgthe results
to see if your script is being run?

HTH,

Mikey

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux