Boost logo

Boost :

Subject: Re: [boost] Subject: Formal Review of Proposed Boost.Process library starts tomorrow
From: John Bytheway (jbytheway+boost_at_[hidden])
Date: 2011-02-10 04:36:03

On 10/02/11 00:05, Boris Schaeling wrote:
> On Wed, 09 Feb 2011 12:00:12 +0100, Artyom <artyomtnk_at_[hidden]> wrote:
>> [...] Deadlock Scenario:
>> ------------------
>> 1. I start two asio::io_service instances A, B
>> 2. I create child a and wait for it in A service.
>> 3. I create child b and wait for it in B service.
>> 4. io_service A gets status of children B.
>> 5. service B never terminates as wait would not exit.
>> Race Condition Scenario:
>> ------------------------
>> 1. I start process A and start waiting for its termination
>> Asynchronously.
>> 2. I start process B and it terminates
>> 3. wait() receives it status and pid is deleted
>> 4. I wait for B Synchronously.
>> 5. I got a error as PID does not exits.
>> It is badly designed and has major bugs
> The only bug I see is then in the documentation where it should be
> stated clearly that this is not and was never intended to be supported
> (as it's indeed impossible with the current implementation).

I don't pretend to be an expert, but I thought that one could safely get
around these sorts of problems with wait by using waitpid instead,
rather than having to use signal handlers. Does that solution apply in
this case?

John Bytheway

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