@@ -126,7 +126,7 @@ addprocs([
126
126
127
127
* `exeflags`: additional flags passed to the worker processes. It can either be a `Cmd`, a `String`
128
128
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"]`.
130
130
131
131
* `topology`: Specifies how the workers connect to each other. Sending a message between
132
132
unconnected workers results in an error.
@@ -767,7 +767,8 @@ function kill(manager::SSHManager, pid::Int, config::WorkerConfig)
767
767
nothing
768
768
end
769
769
770
- function kill (manager:: LocalManager , pid:: Int , config:: WorkerConfig ; exit_timeout = 15 , term_timeout = 15 )
770
+ function kill (manager:: LocalManager , pid:: Int , config:: WorkerConfig ; profile_wait = 6 , exit_timeout = 15 , term_timeout = 15 )
771
+ # profile_wait = 6 is 1s for profile, 5s for the report to show
771
772
# First, try sending `exit()` to the remote over the usual control channels
772
773
remote_do (exit, pid)
773
774
@@ -776,7 +777,14 @@ function kill(manager::LocalManager, pid::Int, config::WorkerConfig; exit_timeou
776
777
777
778
# Check to see if our child exited, and if not, send an actual kill signal
778
779
if ! process_exited (config. process)
779
- @warn (" Failed to gracefully kill worker $(pid) , sending SIGQUIT" )
780
+ @warn " Failed to gracefully kill worker $(pid) "
781
+ profile_sig = Sys. iswindows () ? nothing : Sys. isbsd () ? (" SIGINFO" , 29 ) : (" SIGUSR1" , 10 )
782
+ if profile_sig != = nothing
783
+ @warn (" Sending profile $(profile_sig[1 ]) to worker $(pid) " )
784
+ kill (config. process, profile_sig[2 ])
785
+ sleep (profile_wait)
786
+ end
787
+ @warn (" Sending SIGQUIT to worker $(pid) " )
780
788
kill (config. process, Base. SIGQUIT)
781
789
782
790
sleep (term_timeout)
0 commit comments