PEP 3143 and customizations

Ethan Furman ethan at stoneleaf.us
Wed May 21 21:34:45 UTC 2014


On 05/21/2014 01:57 PM, Helmut Grohne wrote:
>
> The name "parent_callback" is misleading, because the callback must be
> executed in the child process. If it were to be executed in the parent
> and were to initialize a thread, then the exiting of the parent were to
> terminate the newly spawned thread. Not the desired outcome.

> Consider a different change:
>
> The .open() method gains a keyword parameter "exitparent" defaulting to
> True. [...]

Let's take a step back, as I don't think I understand completely what you want.  It sounds like two things are going on 
and I was confusing the two together.

So, if I understood your latest post, one of the two things is that Parent doesn't exit until it knows that Child 
started up with no errors, and it gets this info via a pipe (according to your PoC); if Child does experience an error, 
the error text is passed through the pipe to be printed.  Either way, Parent will exit fairly shortly after Child 
starts, just not immediately.

The second thing you want is for continued set up to happen in Child after Child is spawned... oh, wait -- I think I 
understand -- you want Parent to hang around and wait for the result of the continued set up in Child, so it can report 
any errors encountered... have I understood?

--
~Ethan~



More information about the python-daemon-devel mailing list