Re: testing if another instance of a script is already running

2008-09-14 Thread skip
Aaron> Would it suffice to call 'os.open' with flags= _O_CREAT| _O_EXCL Aaron> ? Would that be platform-independent? I suspect it would be platform-independent but not NFS-safe. (The other solutions in lockfile might have NFS problems as well. In any case, lockfile provides a bit more

Re: testing if another instance of a script is already running

2008-09-13 Thread Aaron "Castironpi" Brady
On Sep 13, 5:34 pm, [EMAIL PROTECTED] wrote: >     >> I don't want to handle writing of a PID file because it is too >     >> Unix/Linux specific way to do this, and I need to keep the code to be >     >> cross-platform. >     >> >     >> I think the better way to achieve this is to use some proces

Re: testing if another instance of a script is already running

2008-09-13 Thread skip
>> I don't want to handle writing of a PID file because it is too >> Unix/Linux specific way to do this, and I need to keep the code to be >> cross-platform. >> >> I think the better way to achieve this is to use some process >> control, but I'm a neebie and I don't see ho

Re: testing if another instance of a script is already running

2008-09-13 Thread Aaron "Castironpi" Brady
On Sep 12, 7:08 am, Strato <[EMAIL PROTECTED]> wrote: > Hi folks, > > I want to write some kind of test to check at startup if another > instance of my script is already running. > > I don't want to handle writing of a PID file because it is too > Unix/Linux specific way to do this, and I need to k

Re: testing if another instance of a script is already running

2008-09-13 Thread Larry Bates
Strato wrote: Hi folks, I want to write some kind of test to check at startup if another instance of my script is already running. I don't want to handle writing of a PID file because it is too Unix/Linux specific way to do this, and I need to keep the code to be cross-platform. I think t

Re: testing if another instance of a script is already running

2008-09-13 Thread Larry Bates
Strato wrote: Hi folks, I want to write some kind of test to check at startup if another instance of my script is already running. I don't want to handle writing of a PID file because it is too Unix/Linux specific way to do this, and I need to keep the code to be cross-platform. I think t

Re: testing if another instance of a script is already running

2008-09-12 Thread Tim Golden
Tim Golden wrote: Strato wrote: Hi folks, I want to write some kind of test to check at startup if another instance of my script is already running. I don't want to handle writing of a PID file because it is too Unix/Linux specific way to do this, and I need to keep the code to be cross-pl

Re: testing if another instance of a script is already running

2008-09-12 Thread Tim Golden
Strato wrote: Hi folks, I want to write some kind of test to check at startup if another instance of my script is already running. I don't want to handle writing of a PID file because it is too Unix/Linux specific way to do this, and I need to keep the code to be cross-platform. I think t

testing if another instance of a script is already running

2008-09-12 Thread Strato
Hi folks, I want to write some kind of test to check at startup if another instance of my script is already running. I don't want to handle writing of a PID file because it is too Unix/Linux specific way to do this, and I need to keep the code to be cross-platform. I think the better way t