Skip to content

Commit

Permalink
Use SIGQUIT instead of SIGTERM
Browse files Browse the repository at this point in the history
This allows for easier collection of core dumps.
X-ref: JuliaLang/julia#45864
  • Loading branch information
staticfloat committed Jun 20, 2024
1 parent 6c7cdb5 commit 07389dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/managers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/distributed_exec.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 07389dd

Please sign in to comment.