This is a discussion on RE: [PHP] Re: Ensure only one instance of a script is running within the PHP General forums, part of the PHP Programming Forums category; [snip] > Unluckily, this will not prevent a race condition. The only > file operations that are guaranteed to be ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
[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 |
![]() |
| Thread Tools | |
| Display Modes | |
|
|