From: Sami Väisänen (sami.vaisanen_at_[hidden])
Date: 2008-06-09 05:58:29
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)
Assertion `res == 0'
I wrote a little test application in the hopes of being able to
reproduce the problem in smaller scale but naturally it doesn't happen
there. Regardless im asking here, whether anyone got any ideas about
what might be going wrong and how to go about fixing it.
ps. here's the code for the test application just in case
using namespace std;
using namespace boost;
xt.sec += 1;
pid_t pid = fork();
if (pid != 0)
cout << "parent sleeping...\n";
cout << "child sleeping...\n";
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk