Boost logo

Boost :

Subject: Re: [boost] [Boost-users] Brainstorming [WAS: Subject: Formal Review of Proposed Boost.Process library starts tomorrow]
From: Oliver Kowalke (k-oli_at_[hidden])
Date: 2011-02-14 11:14:16

Am 14.02.2011 16:45, schrieb Klaim - Joël Lamotte:
> As far as I know, from a previous discussion on this list, async_wait might
> be the only (cross-platform) way (without having to add another dependency
> than boost to the project...) to achive the last point, knowing when the
> child process ends.

Do you mean with async_wait the feature dealing with SIGCHLD and
sigwait()? If so it is not cross-platform. As discussed in this thread
waiting on signals asynchronously influences the application and other
libs - see installing signal handlers.
IMHO waiting on signals (SIGCHLD, SIGTERM, SIGSTOP, SIGUSR1, ...) should
be implemented in a separate library.

> About the "thread and future + sync. waiting" way of doing it : would it
> work with any kind of child process end (including any kind of crash)? Or
> is it part of the limitations you're thinking about?

Yes - waitpid( child_pid, ...) blocking in one separate thread -
returning the result in a future. Depending on how many threads are
created blocking in waitpid it may reduce the performance (at least at
some amount of threads the scheduling overhead may become significant).

> About the initial question, I've always thought that Boost.Process would
> provide :
> 1. A cross-platform way to manipulate processes (child processes) including
> managing their "life-time".

'Managing life-time' means stop, continue, kill children?

> 2. Maybe some platform-specific utilites.
> 3. Easy Inter-process communication "would be cool" but as there is another
> library providing this feature, is not a show stopper for me.


Boost list run by bdawes at, gregod at, cpdaniel at, john at