From 9d9d05b22d4aa235e1861db0167245bad8288f7f Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Mon, 1 Dec 2014 19:02:31 +0900 Subject: [PATCH] configury: fix opal_config_pthreads when -lrt is set the test program was successful without -pthread if -lrt is used. -pthread *is* required in order to correctly handle the pthread_atfork function. --- config/opal_config_pthreads.m4 | 1 + 1 file changed, 1 insertion(+) diff --git a/config/opal_config_pthreads.m4 b/config/opal_config_pthreads.m4 index 7bc0bfe3c3..0d7f9e5ed6 100644 --- a/config/opal_config_pthreads.m4 +++ b/config/opal_config_pthreads.m4 @@ -58,6 +58,7 @@ int main(int argc, char* argv[]) pthread_attr_t attr; me = pthread_self(); + pthread_atfork(NULL, NULL, NULL); pthread_attr_init(&attr); pthread_cleanup_push(cleanup_routine, 0); pthread_create(&newthread, &attr, thread_main, 0);