Skip to content

Commit 8838de0

Browse files
committed
Fix some JET errors around matching methods for kill(...) and process_exited(...)
This is similar to JuliaLang/Distributed.jl#172 (JuliaLang/Distributed.jl@231da28) (cherry picked from commit b856957)
1 parent 44e61c7 commit 8838de0

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src/managers.jl

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ end
553553

554554
function manage(manager::LocalManager, id::Integer, config::WorkerConfig, op::Symbol)
555555
if op === :interrupt
556-
kill(config.process, 2)
556+
kill(config.process::Process, 2)
557557
end
558558
end
559559

@@ -776,21 +776,22 @@ function kill(manager::LocalManager, pid::Int, config::WorkerConfig; profile_wai
776776
sleep(exit_timeout)
777777

778778
# Check to see if our child exited, and if not, send an actual kill signal
779-
if !process_exited(config.process)
779+
process = config.process::Process
780+
if !process_exited(process)
780781
@warn "Failed to gracefully kill worker $(pid)"
781782
profile_sig = Sys.iswindows() ? nothing : Sys.isbsd() ? ("SIGINFO", 29) : ("SIGUSR1" , 10)
782783
if profile_sig !== nothing
783784
@warn("Sending profile $(profile_sig[1]) to worker $(pid)")
784-
kill(config.process, profile_sig[2])
785+
kill(process, profile_sig[2])
785786
sleep(profile_wait)
786787
end
787788
@warn("Sending SIGQUIT to worker $(pid)")
788-
kill(config.process, Base.SIGQUIT)
789+
kill(process, Base.SIGQUIT)
789790

790791
sleep(term_timeout)
791-
if !process_exited(config.process)
792+
if !process_exited(process)
792793
@warn("Worker $(pid) ignored SIGQUIT, sending SIGKILL")
793-
kill(config.process, Base.SIGKILL)
794+
kill(process, Base.SIGKILL)
794795
end
795796
end
796797
end

0 commit comments

Comments
 (0)