@@ -113,7 +113,7 @@ addprocs([
113
113
114
114
* `exeflags`: additional flags passed to the worker processes. It can either be a `Cmd`, a `String`
115
115
holding one flag, or a collection of strings, with one element per flag.
116
- E.g. `\` --threads=auto project=.\` `, `"--compile-trace=stderr"` or `["--threads=auto", "--compile=all"]`.
116
+ E.g. `\` --threads=auto project=.\` `, `"--compile-trace=stderr"` or `["--threads=auto", "--compile=all"]`.
117
117
118
118
* `topology`: Specifies how the workers connect to each other. Sending a message between
119
119
unconnected workers results in an error.
@@ -740,7 +740,8 @@ function kill(manager::SSHManager, pid::Int, config::WorkerConfig)
740
740
nothing
741
741
end
742
742
743
- function kill (manager:: LocalManager , pid:: Int , config:: WorkerConfig ; exit_timeout = 15 , term_timeout = 15 )
743
+ function kill (manager:: LocalManager , pid:: Int , config:: WorkerConfig ; profile_wait = 6 , exit_timeout = 15 , term_timeout = 15 )
744
+ # profile_wait = 6 is 1s for profile, 5s for the report to show
744
745
# First, try sending `exit()` to the remote over the usual control channels
745
746
remote_do (exit, pid)
746
747
@@ -749,7 +750,14 @@ function kill(manager::LocalManager, pid::Int, config::WorkerConfig; exit_timeou
749
750
750
751
# Check to see if our child exited, and if not, send an actual kill signal
751
752
if ! process_exited (config. process)
752
- @warn (" Failed to gracefully kill worker $(pid) , sending SIGQUIT" )
753
+ @warn " Failed to gracefully kill worker $(pid) "
754
+ profile_sig = Sys. iswindows () ? nothing : Sys. isbsd () ? (" SIGINFO" , 29 ) : (" SIGUSR1" , 10 )
755
+ if profile_sig != = nothing
756
+ @warn (" Sending profile $(profile_sig[1 ]) to worker $(pid) " )
757
+ kill (config. process, profile_sig[2 ])
758
+ sleep (profile_wait)
759
+ end
760
+ @warn (" Sending SIGQUIT to worker $(pid) " )
753
761
kill (config. process, Base. SIGQUIT)
754
762
755
763
sleep (term_timeout)
0 commit comments