@@ -113,7 +113,7 @@ addprocs([
113113
114114* `exeflags`: additional flags passed to the worker processes. It can either be a `Cmd`, a `String`
115115 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"]`.
117117
118118* `topology`: Specifies how the workers connect to each other. Sending a message between
119119 unconnected workers results in an error.
@@ -740,7 +740,8 @@ function kill(manager::SSHManager, pid::Int, config::WorkerConfig)
740740 nothing
741741end
742742
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
744745 # First, try sending `exit()` to the remote over the usual control channels
745746 remote_do (exit, pid)
746747
@@ -749,7 +750,14 @@ function kill(manager::LocalManager, pid::Int, config::WorkerConfig; exit_timeou
749750
750751 # Check to see if our child exited, and if not, send an actual kill signal
751752 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) " )
753761 kill (config. process, Base. SIGQUIT)
754762
755763 sleep (term_timeout)
0 commit comments