AW: Re: enbd 2.4.32/kernel 2.6.12.3 pid file problem
| Newsgroups | gmane.linux.enbd.general |
|---|---|
| Message-ID | <4060037.1123522482667.JavaMail.servlet@kundenserver> |
>
>In article you wrote:
>> myckpidfile(struct nbd_pidfile * self) {
>>
>> int otherpid;
>> int mypid = getpid();
>> int myppid = getppid();
>>
>> sleep(2);
>> ^^^^^^^^^
>
>Thinking about it, I don't think it is racing with itself. All I can
>imagine is that you are starting it with some generic daemon starter
>that writes its own pid in the pidfile, and which hangs around just long
>enough to see the parent of this daemon process die (after it has
>launched its daemon child).
>
>That would mean that the extra 2s wait would allow the parent (which
>nowadays runs second after a fork) to die off, the daemon launcher to
>die, and this process to see a pid entry that corresponds to no known
>live process, which can hence be overwritten.
>
>So .. how are you starting the enbd-client?
The client is started by the enbd script like that:
enbd start client
or to start a particular client (as configured in enbd.conf)
enbd start client 0
>
>Peter
>_______________________________________________
>ENBD mailing list
>[email protected]
><a
>href="http://lists.community.tummy.com/mailman/listinfo/enbd">http://lists.comm
>unity.tummy.com/mailman/listinfo/enbd</a>