Am 12.03.2021 um 18:40 schrieb Massimo Manghi:
we still have in mod_rivet (Rivet_ChildInit) this call to Tcl_InitNotifier
/* This code is run once per child process. The forking
* of a child process doesn't preserve the thread where the Tcl
* notifier runs. The Notifier should have been restarted by one the
* pthread_atfork callbacks (setup in Tcl >= 8.5.14 and
Tcl >= 8.6.1). In
* case pthread_atfork is not supported we unconditionally call
Tcl_InitNotifier
* hoping for the best (Bug #55153)
*/
#if !defined(HAVE_PTHREAD_ATFORK)
Tcl_InitNotifier();
#endif
For some reason HAVE_PTHREAD_ATFORK is not defined anymore on my PC
(even though the posix libraries are available) but the controversial
usage of this hook is still debated and people are warned not to use it
or recommended to follow careful mutexes status handling after a fork()
call.
With mod_rivet in branch quattuor Tcl_InitNotifier fails when the worker
MPM is used. I guess this is due some differences with 3.2.0 in the way
interpreters and Tcl are initialized.
I tested the asynchronous message queue to be working nonetheless,
probably as a consequence of the much welcome notifier reorganization
that was done a few years ago.
I would remove this call from the code, perhaps restricting
mod_rivet/quattuor to be used with a version of Tcl8.6 post notifier
rewriting (can't remember which version changed it)
-- Massimo
Yes, this stupid stuff is my kid to support FlightAwares wild style to
load packages and then fork.
Great that you care,
Harald
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscr...@tcl.apache.org
For additional commands, e-mail: rivet-dev-h...@tcl.apache.org