[Pdns-users] Custom backend quit problem

Phil Bayfield phil at bayfmail.com
Mon Jan 17 09:19:51 UTC 2011


On 17 January 2011 07:49, Phil Bayfield <phil at bayfmail.com> wrote:

> On 17 January 2011 07:44, <abang at t-ipnet.net> wrote:
>
>>  Can anyone give me any clues as to why this might happen? Is there a
>>> quit command (I'm already exiting on "QUIT" or empty line from stdin)
>>> that the pipe backend sends? Or maybe this is a bug?
>>>
>>
>> I found this in our perl pipe backend:
>>
>> LINE: while( <> ) {
>>   exit if getppid() == 1; #Exit, cause my parent is dead!
>> ...
>> }
>>
>> Maybe this helps you.
>>
>> Winfried
>>
>
> Thanks for the quick response!
>
> Will give something like this a try, thanks!
>
> Phil.
>
>
This did the trick, I changed my program so that the code that talks to
PowerDNS is now spawned as a secondary thread (as stdin blocks in the
language I'm using) while the main thread monitors parent pid and calls exit
when the parent dies.

Thanks again!

Phil.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20110117/05b943ab/attachment-0001.html>


More information about the Pdns-users mailing list