Subject: Re: [boost] Boost.Process 0.5 released
From: Klaim - JoÃ«l Lamotte (mjklaim_at_[hidden])
Date: 2012-08-27 03:21:16
On Mon, Aug 27, 2012 at 1:07 AM, Boris Schaeling <boris_at_[hidden]> wrote:
> - Would you prefer if child would close the process handle on Windows in
> its destructor automatically?
> - Would that be still OK given that it doesn't help at all on POSIX?
> - Could such a type trick library users into thinking their code is safe
> and correct on all platforms while in fact they must do something extra on
> POSIX to avoid zombies?
I would go for something like thread: the user have to call wait() or
detach() otherwise the destructor just call terminate() if the user didn't
specify what to do.
For "releasing the resources", the POSIX case is still obscure to me, but I
see the problem with the "global" handlers etc.
By default the I would prefer the child process resources to be handled
automatically, until I say otherwise (like the release() function in smart
However as I don't suggest the class destructor to release resource itself,
it would be whatever that execute the process (executor?) that would do the
cleaning in the end of the process.
Is it unrealistic or innappropriate with processes to go this way?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk