зеркало из https://github.com/github/ruby.git
Use the system getenv in setup_debug_log
As ruby_set_debug_option() is called before ruby_sysinit(), CRITICAL_SECTIONs are not initialized yet.
This commit is contained in:
Родитель
819dd464de
Коммит
7563d542d6
1
debug.c
1
debug.c
|
@ -263,6 +263,7 @@ ruby_set_debug_option(const char *str)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if RUBY_DEVEL
|
#if RUBY_DEVEL
|
||||||
|
#undef getenv
|
||||||
|
|
||||||
// RUBY_DEBUG_LOG features
|
// RUBY_DEBUG_LOG features
|
||||||
// See vm_debug.h comments for details.
|
// See vm_debug.h comments for details.
|
||||||
|
|
|
@ -811,7 +811,6 @@ StartSockets(void)
|
||||||
InitializeCriticalSection(&select_mutex);
|
InitializeCriticalSection(&select_mutex);
|
||||||
InitializeCriticalSection(&socklist_mutex);
|
InitializeCriticalSection(&socklist_mutex);
|
||||||
InitializeCriticalSection(&conlist_mutex);
|
InitializeCriticalSection(&conlist_mutex);
|
||||||
InitializeCriticalSection(&uenvarea_mutex);
|
|
||||||
|
|
||||||
atexit(exit_handler);
|
atexit(exit_handler);
|
||||||
}
|
}
|
||||||
|
@ -896,6 +895,7 @@ rb_w32_sysinit(int *argc, char ***argv)
|
||||||
#endif
|
#endif
|
||||||
SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOGPFAULTERRORBOX);
|
SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOGPFAULTERRORBOX);
|
||||||
|
|
||||||
|
InitializeCriticalSection(&uenvarea_mutex);
|
||||||
get_version();
|
get_version();
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Загрузка…
Ссылка в новой задаче