Subject: Re: [boost] [gsoc] Boost.Process done
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2010-09-13 14:15:13
Jeremy Maitin-Shepard wrote:
> On 09/13/2010 04:41 AM, Stewart, Robert wrote:
> > Is not signal handling a process-specific behavior? It may be
> > POSIX-specific, but it seems reasonable that Boost.Process
> > provide signal handling support. Then, Boost.Process can require
> > that all code in a process using that library must coordinate
> > with its signal handling.
> I would not say that general signal handling falls within the
> domain of Boost.Process, but it may make sense for
> Boost.Process to depend on a not-yet-existent Boost POSIX
> Signal Handling library.
I have no problem with that.
> Note, however, that coordination solely at the level of signals
> is not sufficient, at least if the code is to scale to many
> child processes. Rather, specific coordination with respect to
> SIGCHLD and waitpid is needed.
Hmmm. As I see it, Boost.Process would know which child
processes it created and would only call waitpid() on those. No
code outside the library would need to call waitpid() on those.
All that's needed is for Boost.Process' SIGCHLD handler to be
invoked and, if the other code needs a SIGCHLD handler, that it
be invoked by the same mechanism, to ensure correct chaining, and
that the other code never calls waitpid() for child processes
that Boost.Process creates.
Is that what you meant by "specific coordination?" That's not
coordination so much as clear delineation of responsibilities and
behaviors, but it would mean we were just talking past one
another. If you meant something else, please clarify.
Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
Susquehanna International Group, LLP http://www.sig.com
IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk