I get undefined reference to `pthread_atfork' even after using pthread library. Is there any separate library for this?
views:
88answers:
1
+1
A:
pthread_atfork() is part of the POSIX spec, so it should be there in the regular pthread library.
You may have to specify options to both the compiler & linker to build with pthreads. For example, with gcc/linux:
-pthread
Adds support for multithreading with the pthreads library. This option sets flags for both the
preprocessor and linker.
David Gelhar
2010-03-03 16:49:10