summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-07-22 11:11:10 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-07-22 11:11:10 (GMT)
commit7a32d8f6e8b39e52c94b3a375a95bd3b6669c12e (patch)
treecaf27d9ac073238751f890f85c4aca7229bb4470 /unix
parenta038288139470e7a32c1e711fcfdbd64212e87e4 (diff)
downloadtcl-7a32d8f6e8b39e52c94b3a375a95bd3b6669c12e.zip
tcl-7a32d8f6e8b39e52c94b3a375a95bd3b6669c12e.tar.gz
tcl-7a32d8f6e8b39e52c94b3a375a95bd3b6669c12e.tar.bz2
Tcl_InitNotifier() call in TestforkObjCmd() is only necessary when pthread_atfork() is not available.
Diffstat (limited to 'unix')
-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;
}