1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
|
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
|
-
+
-
-
-
+
-
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
*/
notifierThread = (Tcl_ThreadId) 0;
/*
* Reset the notifier reference count to zero (i.e. not initialized).
* This should force the notifier initialization code to be re-run the
* very next time Tcl_InitNotifier is called.
* very next time Tcl_InitNotifier is called, which will be at the end
*
* For a plain [exec ...] this will not happen, and everything is fine.
* For a full fork of the interpreter (like apache Rivet) it is not clear
* of this function.
* to me (AK) where TIN would be called.
*/
notifierCount = 0;
/*
* Finalize and reset the condition variable. This should force it to
* be re-created during the next call to Tcl_ConditionWait().
*/
Tcl_ConditionFinalize(¬ifierCV);
notifierCV = NULL;
/*
* Finally, release the notifier mutex (which has been held since the
* AtForkPrepareProc() was called via pthread_atfork()).
* Release, finalize, and reset the notifier mutex (which has been
* held since the AtForkPrepareProc() was called via pthread_atfork()).
* This should force it to be re-created during the next call to
* Tcl_MutexLock().
*/
Tcl_MutexUnlock(¬ifierMutex);
Tcl_MutexFinalize(¬ifierMutex);
notifierMutex = NULL;
/*
* Force the notifier subsystem to be initialized now. This should
* create the notifier thread in this process. Subsequently, that new
* thread will re-open the trigger pipe.
*/
Tcl_InitNotifier();
}
#endif /* HAVE_PTHREAD_ATFORK */
#endif /* TCL_THREADS */
#endif /* HAVE_COREFOUNDATION */
|