You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by Harald Oehlmann <ha...@elmicron.de> on 2013/07/22 15:01:45 UTC

Re: [TCLCORE] Start Tcl notifier thread after fork

Am 22.07.2013 14:49, schrieb Massimo Manghi:
> On 07/22/2013 01:20 PM, Harald Oehlmann wrote:
>> - If so, Massimo could introduce in Rivet a call to Tcl_InitNotifier,
>> eventually conditioned on patched tcl (say 8.5.14, 8.6.1) and no
>> HAVE_PTHREAD_ATFORK... IMHO the call never harms, but it might be not
>> necessary in most cases...
> 
> Jan's approach is probably the wisest and we should simply look at the
> problem from the Rivet's perspective: just call Tcl_InitNotifier
> unconditionally. Either the notifier is started correctly or not it
> doesn't matter. We could let 'configure' print a warning if the version
> of Tcl is among those that doesn't handle the fork consistently and in
> case say loud that fileevent handlers won't work. Did I get the picture?
> 
> If it's all about adding that call I can do it tonight and do some tests.

Massimo,

I would appreciate, if you could do it.
If we have no answer on the question, if there are any platforms not
having pthread_atfork(), we could just do it.

On the strict rivet view, we still have an issue, which is perhaps not
as important as I thought:

1) we have no solution for unpatched tcl (<8.5.15) threaded builds.
or
2) the solution for those platforms would be to completly restructure
rivet_mod.c and  loose Rivet_Init_Proc (all names from memory).

I would forget (2), as:
- if people use a standard linux distribution, the builds are mostly
unthreaded
- if people compile tcl on their own, they may recompile tcl.
- It only concerns Linux, MacOS has already a solution for this (who may
test ?)

Perhaps, we should modify the requirements on tcl:
- threaded build on Unix, not MacOS: tcl8.6.1, tcl8.5.15
- no threaded build: as current

Regards,
Harald


---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org