Boost logo

Boost :

From: Anthony Williams (anthony.ajw_at_[hidden])
Date: 2008-06-09 06:32:55

Sami Väisänen <sami.vaisanen_at_[hidden]> writes:

> I have an application that forks a child process. The child exists only
> for a little while, (does dup2() calls to redirect stdout/stderr output
> into pipes and then makes a system() call) and then exits with exit().
> However at exit I get an assertion failure in boost.thread library (the
> assertion happens in the child process)
> ../boost_1_34_1/libs/thread/src/condition.cpp:351:boost::detail::condition_impl::~condition_impl():
> Assertion `res == 0'

That error indicates that the underlying condition variable couldn't
be destroyed properly. Are you sure that your OS correctly clones
condition variables when you do a fork?

Forking generally doesn't play well with multi-threaded apps anyway, since
fork only clones the current thread.


Anthony Williams            | Just Software Solutions Ltd
Custom Software Development |
Registered in England, Company Number 5478976.
Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL

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