Re: My way to check if a progam is already running
- From: Jan Panteltje <pNaonStpealmtje@xxxxxxxxx>
- Date: Tue, 26 Jun 2007 11:26:33 GMT
On a sunny day (Mon, 25 Jun 2007 16:57:19 -0700) it happened David Schwartz
<davids@xxxxxxxxxxxxx> wrote in
<1182815839.808132.9630@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>:
On Jun 25, 2:49 pm, Jan Panteltje <pNaonStpealm...@xxxxxxxxx> wrote:
EAGAIN The file is locked and F_TLOCK or F_TEST was specified,
or the operation is prohibited because the file has been memory
mapped by another process.
etc for other errors.
In other words, some other process is using the file. This is exactly
what you were testing for, so you have your answer.
I have tried several varieties of the code, both testing for EACCES and testing > for EAGAIN.
I suggest you try some before you criticise,
Else it is just untried blabber.
Your code is broken. EAGAIN gives you your answer, there is no reason
to retry.
DS
No my code works perfectly, immediately.
What is broken or at least illogical is their use of errno.
;-)
.
- Follow-Ups:
- Re: My way to check if a progam is already running
- From: David Schwartz
- Re: My way to check if a progam is already running
- References:
- My way to check if a progam is already running
- From: Jan Panteltje
- Re: My way to check if a progam is already running
- From: Jan Panteltje
- Re: My way to check if a progam is already running
- From: Michal Nazarewicz
- Re: My way to check if a progam is already running
- From: Jan Panteltje
- Re: My way to check if a progam is already running
- From: Michal Nazarewicz
- Re: My way to check if a progam is already running
- From: Jan Panteltje
- Re: My way to check if a progam is already running
- From: Michal Nazarewicz
- Re: My way to check if a progam is already running
- From: panteltje
- Re: My way to check if a progam is already running
- From: Michal Nazarewicz
- Re: My way to check if a progam is already running
- From: Jan Panteltje
- Re: My way to check if a progam is already running
- From: Jan Panteltje
- Re: My way to check if a progam is already running
- From: Michal Nazarewicz
- Re: My way to check if a progam is already running
- From: Jan Panteltje
- Re: My way to check if a progam is already running
- From: Rainer Weikusat
- Re: My way to check if a progam is already running
- From: Jan Panteltje
- Re: My way to check if a progam is already running
- From: David Schwartz
- Re: My way to check if a progam is already running
- From: Jan Panteltje
- Re: My way to check if a progam is already running
- From: David Schwartz
- My way to check if a progam is already running
- Prev by Date: is it possible to write to some my log file...just like user space program?
- Next by Date: Re: stack trace without core
- Previous by thread: Re: My way to check if a progam is already running
- Next by thread: Re: My way to check if a progam is already running
- Index(es):
Relevant Pages
|