From 07389dd18d3e258aa7e3f3b35881f9ca02b37c5f Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Thu, 20 Jun 2024 11:14:20 -0700 Subject: [PATCH] Use `SIGQUIT` instead of `SIGTERM` This allows for easier collection of core dumps. X-ref: https://github.com/JuliaLang/julia/pull/45864 --- src/managers.jl | 6 +++--- test/distributed_exec.jl | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/managers.jl b/src/managers.jl index b2b655a..8476384 100644 --- a/src/managers.jl +++ b/src/managers.jl @@ -747,12 +747,12 @@ function kill(manager::LocalManager, pid::Int, config::WorkerConfig; exit_timeou # Check to see if our child exited, and if not, send an actual kill signal if !process_exited(config.process) - @warn("Failed to gracefully kill worker $(pid), sending SIGTERM") - kill(config.process, Base.SIGTERM) + @warn("Failed to gracefully kill worker $(pid), sending SIGQUIT") + kill(config.process, Base.SIGQUIT) sleep(term_timeout) if !process_exited(config.process) - @warn("Worker $(pid) ignored SIGTERM, sending SIGKILL") + @warn("Worker $(pid) ignored SIGQUIT, sending SIGKILL") kill(config.process, Base.SIGKILL) end end diff --git a/test/distributed_exec.jl b/test/distributed_exec.jl index 7b5c983..8a15559 100644 --- a/test/distributed_exec.jl +++ b/test/distributed_exec.jl @@ -1916,7 +1916,7 @@ begin # Next, ensure we get a log message when a worker does not cleanly exit w = only(addprocs(1)) - @test_logs (:warn, r"sending SIGTERM") begin + @test_logs (:warn, r"sending SIGQUIT") begin remote_do(w) do # Cause the 'exit()' message that `rmprocs()` sends to do nothing Core.eval(Base, :(exit() = nothing))