Boost logo

Boost :

Subject: Re: [boost] Subject: Formal Review of Proposed Boost.Process library starts tomorrow
From: Artyom (artyomtnk_at_[hidden])
Date: 2011-02-09 11:03:24


> From: bruno romano <brommul_at_[hidden]>
>
> hi Artyom.
>
> 1. Create a thread for asio service
> 2. Call pid = wait(&status) <-- Problem is here
> 3. Notify the event loop on childs that finished.
>
> for solved this problem two or more io_service in same process need use this
> system call* signalfd(2) ?
> *If use signalfd(2) can receive all signal and* *can possible receive
> SIGCHILD if a child terminate.

a) signalfd is Linux specific

b) In same way you can use sigwaitinfo for SIGCHLD
   but it still does not solve the problem.

c) You need to provide a signal handler that would notify
   all active io_services and once they notified they should
   poll for current processes that it waits for them
   to check if they are terminated.

   Or some signal chaining may be used...
   
   It is not simple, but nobody says that is should be
   so.
   
 
Artyom

      


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk