summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornijtmans@users.sourceforge.net <jan.nijtmans>2013-07-22 11:11:10 (GMT)
committernijtmans@users.sourceforge.net <jan.nijtmans>2013-07-22 11:11:10 (GMT)
commitb51e7e9245a7f0a1b59b6f23e9152fbf926c7b03 (patch)
treecaf27d9ac073238751f890f85c4aca7229bb4470
parentdf8c9343d950267a4f466f8ca9cd5069354b75a9 (diff)
downloadtcl-b51e7e9245a7f0a1b59b6f23e9152fbf926c7b03.zip
tcl-b51e7e9245a7f0a1b59b6f23e9152fbf926c7b03.tar.gz
tcl-b51e7e9245a7f0a1b59b6f23e9152fbf926c7b03.tar.bz2
Tcl_InitNotifier() call in TestforkObjCmd() is only necessary when pthread_atfork() is not available.
-rw-r--r--unix/tclUnixTest.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/unix/tclUnixTest.c b/unix/tclUnixTest.c
index 39cddef..2fc1647 100644
--- a/unix/tclUnixTest.c
+++ b/unix/tclUnixTest.c
@@ -574,9 +574,12 @@ TestforkObjCmd(
"Cannot fork", NULL);
return TCL_ERROR;
}
+#ifndef HAVE_PTHREAD_ATFORK
+ /* Only needed when pthread_atfork is not present. */
if (pid==0) {
Tcl_InitNotifier();
}
+#endif
Tcl_SetObjResult(interp, Tcl_NewIntObj(pid));
return TCL_OK;
}