Skip to content

Commit bd251bb

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 a932787 commit bd251bb

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/managers.jl

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ addprocs([
126126
127127
* `exeflags`: additional flags passed to the worker processes. It can either be a `Cmd`, a `String`
128128
holding one flag, or a collection of strings, with one element per flag.
129-
E.g. `\`--threads=auto project=.\``, `"--compile-trace=stderr"` or `["--threads=auto", "--compile=all"]`.
129+
E.g. `\`--threads=auto project=.\``, `"--compile-trace=stderr"` or `["--threads=auto", "--compile=all"]`.
130130
131131
* `topology`: Specifies how the workers connect to each other. Sending a message between
132132
unconnected workers results in an error.
@@ -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

@@ -775,14 +775,15 @@ function kill(manager::LocalManager, pid::Int, config::WorkerConfig; exit_timeou
775775
sleep(exit_timeout)
776776

777777
# Check to see if our child exited, and if not, send an actual kill signal
778-
if !process_exited(config.process)
778+
process = config.process::Process
779+
if !process_exited(process)
779780
@warn("Failed to gracefully kill worker $(pid), sending SIGQUIT")
780-
kill(config.process, Base.SIGQUIT)
781+
kill(process, Base.SIGQUIT)
781782

782783
sleep(term_timeout)
783-
if !process_exited(config.process)
784+
if !process_exited(process)
784785
@warn("Worker $(pid) ignored SIGQUIT, sending SIGKILL")
785-
kill(config.process, Base.SIGKILL)
786+
kill(process, Base.SIGKILL)
786787
end
787788
end
788789
end

0 commit comments

Comments
 (0)