Skip to content

Commit

Permalink
Merge pull request #103 from JuliaLang/sf/sigquit_instead
Browse files Browse the repository at this point in the history
Use `SIGQUIT` instead of `SIGTERM`
  • Loading branch information
staticfloat committed Jun 23, 2024
2 parents 6c7cdb5 + 07389dd commit 2017da9
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 2017da9

Please sign in to comment.