mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00
SetErrorMode for all Ray processes (#8656)
This commit is contained in:
parent
35eeec5647
commit
cb91fe2fc4
2 changed files with 7 additions and 6 deletions
|
@ -66,12 +66,7 @@ WorkerPool::WorkerPool(boost::asio::io_service &io_service, int num_workers,
|
|||
raylet_config_(raylet_config),
|
||||
starting_worker_timeout_callback_(starting_worker_timeout_callback) {
|
||||
RAY_CHECK(maximum_startup_concurrency > 0);
|
||||
#ifdef _WIN32
|
||||
// If worker processes fail to initialize, don't display an error window.
|
||||
SetErrorMode(GetErrorMode() | SEM_FAILCRITICALERRORS);
|
||||
// If worker processes crash, don't display an error window.
|
||||
SetErrorMode(GetErrorMode() | SEM_NOGPFAULTERRORBOX);
|
||||
#else
|
||||
#ifndef _WIN32
|
||||
// Ignore SIGCHLD signals. If we don't do this, then worker processes will
|
||||
// become zombies instead of dying gracefully.
|
||||
signal(SIGCHLD, SIG_IGN);
|
||||
|
|
|
@ -214,6 +214,12 @@ void RayLog::ShutDownRayLog() {
|
|||
}
|
||||
|
||||
void RayLog::InstallFailureSignalHandler() {
|
||||
#ifdef _WIN32
|
||||
// If process fails to initialize, don't display an error window.
|
||||
SetErrorMode(GetErrorMode() | SEM_FAILCRITICALERRORS);
|
||||
// If process crashes, don't display an error window.
|
||||
SetErrorMode(GetErrorMode() | SEM_NOGPFAULTERRORBOX);
|
||||
#endif
|
||||
#ifdef RAY_USE_GLOG
|
||||
if (is_failure_signal_handler_installed_) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue