* 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,
Nicolas,
You could try something like
Anybody has an example of how to use flock ?
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
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
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
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
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
7 matches
Mail list logo