
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 09 June 2008 06:32 am, Anthony Williams wrote:
Sami Väisänen <sami.vaisanen@ardites.com> 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::conditio 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 re-initialized in the child process after a fork, as mentioned in the pthread_atfork man page. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFITSZh5vihyNWuA4URAllwAJ94J6WzUqLfqMvVY1chbM+DwFX57gCfQDp+ jLsaav0IKluGfDJxQFSJZOs= =/U7Y -----END PGP SIGNATURE-----