summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorAdhemerval Zanella <azanella@linux.vnet.ibm.com>2014-02-02 19:21:53 -0200
committerAdhemerval Zanella <azanella@linux.vnet.ibm.com>2014-02-02 19:21:53 -0200
commit05c33f53081cf737852f86bf3e19891e99043103 (patch)
tree34a1f3b813399658140e240ab6a3984884dc4420 /configure
parent73ccf4d1b9e0730bbe6e879b3e2d267e07996c16 (diff)
downloadgperftools-05c33f53081cf737852f86bf3e19891e99043103.tar.gz
issue-496: Fix possible deadlock in thread+fork
This patch adds a pthread_atfork handler to set the internal locks in consistent state.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure11
1 files changed, 11 insertions, 0 deletions
diff --git a/configure b/configure
index a5c1763..1b7c5cf 100755
--- a/configure
+++ b/configure
@@ -15114,6 +15114,17 @@ _ACEOF
fi
done
# for turning off services when run as root
+for ac_func in fork
+do :
+ ac_fn_c_check_func "$LINENO" "fork" "ac_cv_func_fork"
+if test "x$ac_cv_func_fork" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_FORK 1
+_ACEOF
+
+fi
+done
+ # for the pthread_atfork setup
for ac_header in features.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "features.h" "ac_cv_header_features_h" "$ac_includes_default"