id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 3921,Boost unit test & signals on linux,habdank@…,Gennadiy Rozental,"Dears, The code below is working in the normal executable, but not in the test framework. The problem was very hard to find, because Linux tool are allowed to change order of the process execution. Generally the problem is caused by signal monitor from the test framework. After fork() something happens (execlp) and then child process when exiting emits SIGCHLD, this signal normally reaches parent process. In the boost unit test signal monitor catches it, but not re-emits, so parent process hangs. // for testing you may use ::std::string const process_name (""ls -al""); pid_t const pid = fork(); if (pid < 0) { error = -1; } else { ::std::cerr << __PRETTY_FUNCTION__ << ' ' << __LINE__ << '\n'; if (pid == 0) // child { ::std::cerr << __PRETTY_FUNCTION__ << ' ' << __LINE__ << '\n'; ::boost::int32_t const ret (execlp (process_name.c_str(), process_name.c_str(), NULL)); ::std::cerr << __PRETTY_FUNCTION__ << ' ' << __LINE__ << '\n'; // do not flush stdout _exit(127); ::std::cerr << __PRETTY_FUNCTION__ << ' ' << __LINE__ << '\n'; } else { ::std::cerr << __PRETTY_FUNCTION__ << ' ' << __LINE__ << '\n'; // ignore waiting because we need to continue without waiting //int const wt = waitpid(pid, NULL, WUNTRACED | WCONTINUED); int const wt = waitpid(pid, NULL, 0); ::std::cerr << ""wt = "" << wt << '\n'; if (wt < 0) { ::std::cerr << __PRETTY_FUNCTION__ << ' ' << __LINE__ << '\n'; } } }",Bugs,closed,Boost 1.43.0,test,Boost 1.40.0,Problem,fixed,,