From: Sami Väisänen (sami.vaisanen_at_[hidden])
Date: 2008-06-09 09:02:56
Frank Mori Hess wrote:
> On Monday 09 June 2008 06:32 am, Anthony Williams wrote:
> >> Sami Väisänen <sami.vaisanen_at_[hidden]> writes:
> >>> I have an application that forks a child process. The child exists
> >>> for a little while, (does dup2() calls to redirect stdout/stderr
> >>> 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
> >>> assertion happens in the child process)
> >>> n_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?
> pthreads (at least the version I have) requires mutexes to be
> in the child process after a fork, as mentioned in the pthread_atfork man
mmh, sounds like this would require me to track the mutexes in the
parent process in order to be able to re-initialize them in the child
process. I guess I must look for alternative ways for solving this
problem. (ways that do not involve forking)
> Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk