Posted to tcl by dgp at Thu Apr 25 17:45:29 GMT 2013view raw

  1. Index: generic/tclEvent.c
  2. ==================================================================
  3. --- generic/tclEvent.c
  4. +++ generic/tclEvent.c
  5. @@ -1020,11 +1020,11 @@
  6. {
  7. if (inExit != 0) {
  8. Tcl_Panic("TclInitSubsystems called while exiting");
  9. }
  10.  
  11. - if (subsystemsInitialized == 0) {
  12. + if (subsystemsInitialized < 2) {
  13. /*
  14. * Double check inside the mutex. There are definitly calls back into
  15. * this routine from some of the functions below.
  16. */
  17.  
  18. @@ -1059,10 +1059,11 @@
  19. * mutexes. */
  20. TclInitIOSubsystem(); /* Inits a tsd key (noop). */
  21. TclInitEncodingSubsystem(); /* Process wide encoding init. */
  22. TclpSetInterfaces();
  23. TclInitNamespaceSubsystem();/* Register ns obj type (mutexed). */
  24. + subsystemsInitialized = 2;
  25. }
  26. TclpInitUnlock();
  27. }
  28. TclInitNotifier();
  29. }
  30.