Re: [PHP] Only one instance of a script at a time !

2001-12-28 Thread Brian Clark
* Nicolas Guilhot ([EMAIL PROTECTED]) [Dec 28. 2001 10:00]: > I was thinking about this solution, but what can I do if the script ends > prematurely. The file will never be deleted ?? It's a nasty hack, but you chould run a separate shell script to check for the existance of the running script,

Re: [PHP] Only one instance of a script at a time !

2001-12-28 Thread Gerard Onorato
Nicolas, You could try something like Anybody has an example of how to use flock ?

Re: [PHP] Only one instance of a script at a time !

2001-12-28 Thread Nicolas Guilhot
I was thinking about this solution, but what can I do if the script ends prematurely. The file will never be deleted ?? Anybody has an example of how to use flock ? Nicolas "Gerard Onorato" <[EMAIL PROTECTED]> a écrit dans le message news: [EMAIL PROTECTED] > There may be a much easier method ho

Re: [PHP] Only one instance of a script at a time !

2001-12-28 Thread Andrey Hristov
Under *nix - SysV semaphores HTH Regards, Andrey Hristov - Original Message - From: "Nicolas Guilhot" <[EMAIL PROTECTED]> To: "Php General MailingList" <[EMAIL PROTECTED]> Sent: Friday, December 28, 2001 4:31 PM Subject: [PHP] Only one instance of a script at a time ! > Running a php

Re: [PHP] Only one instance of a script at a time !

2001-12-28 Thread Gerard Onorato
There may be a much easier method however why not write a file and then check for it's existence on the next execution. Delete the file at the end of execution to clear the way for the next pass. Quick and dirty so probably at least on typo On Fri, 28 Dec 2001 15:31:33 +0100, Nicolas Guilhot

Re: [PHP] Only one instance of a script at a time !

2001-12-28 Thread Julio Nobrega Trabalhando
Another idea, run a script that opens a file and flocks it until it's executed. I am sorry if this is dumb as I have little experience on locking files, but, I guess if it's locked it won't get opened again and executed (via include() or eval()); -- Julio Nobrega. Um dia eu chego lá: http://s

RE: [PHP] Only one instance of a script at a time !

2001-12-28 Thread Jerry Verhoef (UGBI)
Pseudo code: check if pid file exists yes -> DIE no -> write pid file At end of script delete pid file Jerry Verhoef -Original Message- From: Nicolas Guilhot [mailto:[EMAIL PROTECTED]] Sent: Friday, December 28, 2001 3:32 PM To: Php General MailingList Subject: [PHP] Only one instance