Opened 12 years ago
Closed 12 years ago
#4484 closed Bugs (invalid)
bug in boost.thread on freebsd 8.0
Reported by: | Owned by: | Anthony Williams | |
---|---|---|---|
Milestone: | Boost 1.44.0 | Component: | thread |
Version: | Boost 1.43.0 | Severity: | Regression |
Keywords: | thread freebsd | Cc: | viboes |
Description
I use boost1.43 on FreeBSD 8.0-RELEASE-p3 amd64, installed from ports. Here is a simple program that causes an assertion:
Assertion failed: (!pthread_cond_wait(&cond,m.mutex()->native_handle())), function wait, file ./boost/thread/pthread/condition_variable.hpp, line 20.
during execution.
#include <boost/thread.hpp> #include <cstdlib> using namespace std; void ThreadFun(int number) { sleep(5); } int main(int argc, char** argv) { if (argc > 1) { pid_t pid = fork(); if (pid < 0) { return EXIT_FAILURE; } else if (pid > 0) { return EXIT_SUCCESS; } } boost::thread th1(boost::bind(&ThreadFun, 1)); th1.join(); return EXIT_SUCCESS; }
Error occurs only when I execute program with command line arguments(when the process forks) and only on freebsd 8.0 (on ubuntu 10.04 x64 and on freebsd 7.3 amd 64 it works correct).
Attachments (1)
Change History (5)
by , 12 years ago
comment:1 by , 12 years ago
Cc: | added |
---|
comment:3 by , 12 years ago
Do you mean that the ticket can be closed or that something must be changed on the way Boost.Thread is built? If the first be free to close it yourself.
Vicente
comment:4 by , 12 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Boost.Thread cleanup when the program exit. Do you know if Boost.Thread can do something to attached a handler when the dlclose is called on its dl handle?