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

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-16-2005
Mikey
 
Posts: n/a
Default RE: [PHP] Re: Ensure only one instance of a script is running

[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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:59 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0