diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-10-29 08:17:19 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-10-29 08:17:19 (GMT) |
commit | 89c02b35e1dda98920322d5f292a1aa15433bfef (patch) | |
tree | c3f39f73eee4a73a274f62206d925afe860ed737 /unix | |
parent | 31d8fbb925903a7cbc0865e8f058a9eb4a064d2a (diff) | |
parent | 71bc6d6f0a3521ab154d247c7cfe368918b0475b (diff) | |
download | tcl-89c02b35e1dda98920322d5f292a1aa15433bfef.zip tcl-89c02b35e1dda98920322d5f292a1aa15433bfef.tar.gz tcl-89c02b35e1dda98920322d5f292a1aa15433bfef.tar.bz2 |
Workaround for [414d10346b]: tcl 8.5.15/8.6.1(threaded build) hangs in exec on HP-UX
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tclUnixNotfy.c | 6 | ||||
-rw-r--r-- | unix/tclUnixTest.c | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c index 254614f..b234667 100644 --- a/unix/tclUnixNotfy.c +++ b/unix/tclUnixNotfy.c @@ -194,7 +194,7 @@ static Tcl_ThreadId notifierThread; #ifdef TCL_THREADS static void NotifierThreadProc(ClientData clientData); -#if defined(HAVE_PTHREAD_ATFORK) && !defined(__APPLE__) +#if defined(HAVE_PTHREAD_ATFORK) && !defined(__APPLE__) && !defined(__hpux) static int atForkInit = 0; static void AtForkPrepare(void); static void AtForkParent(void); @@ -290,7 +290,7 @@ Tcl_InitNotifier(void) */ Tcl_MutexLock(¬ifierMutex); -#if defined(HAVE_PTHREAD_ATFORK) && !defined(__APPLE__) +#if defined(HAVE_PTHREAD_ATFORK) && !defined(__APPLE__) && !defined(__hpux) /* * Install pthread_atfork handlers to reinitialize the notifier in the * child of a fork. @@ -1313,7 +1313,7 @@ NotifierThreadProc( TclpThreadExit(0); } -#if defined(HAVE_PTHREAD_ATFORK) && !defined(__APPLE__) +#if defined(HAVE_PTHREAD_ATFORK) && !defined(__APPLE__) && !defined(__hpux) /* *---------------------------------------------------------------------- * diff --git a/unix/tclUnixTest.c b/unix/tclUnixTest.c index 21a7bad..4b0f369 100644 --- a/unix/tclUnixTest.c +++ b/unix/tclUnixTest.c @@ -566,12 +566,11 @@ TestforkObjCmd( "Cannot fork", NULL); return TCL_ERROR; } -#if !defined(HAVE_PTHREAD_ATFORK) - /* Only needed when pthread_atfork is not present. */ + /* Only needed when pthread_atfork is not present, + * should not hurt otherwise. */ if (pid==0) { Tcl_InitNotifier(); } -#endif Tcl_SetObjResult(interp, Tcl_NewIntObj(pid)); return TCL_OK; } |