This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new cfece0b0 SIGINT is too gentle
cfece0b0 is described below

commit cfece0b0eec9a5b174c4b74bcad0b2374f34fd77
Author: Sebb <[email protected]>
AuthorDate: Tue Dec 12 09:46:11 2023 +0000

    SIGINT is too gentle
---
 tools/site-scan.rb | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tools/site-scan.rb b/tools/site-scan.rb
index 38f3a852..b68caab3 100755
--- a/tools/site-scan.rb
+++ b/tools/site-scan.rb
@@ -226,15 +226,15 @@ def exec_with_timeout(cmd, timeout)
     ret=''
     begin
       # kill -pid responds with EINVAL - invalid argument
-      $stderr.puts "WARN:  #{Time.now} about to kill -2 #{pid}"
-      ret = Process.kill(-2, pid) # INT
-      $stderr.puts "WARN:  #{Time.now} sent kill -2 #{pid} ret=#{ret}"
+      $stderr.puts "WARN:  #{Time.now} about to kill -15 #{pid}"
+      ret = Process.kill(-15, pid) # SIGTERM
+      $stderr.puts "WARN:  #{Time.now} sent kill -15 #{pid} ret=#{ret}"
 
       sleep 15 # allow some time for process to exit
 
-      $stderr.puts "WARN:  #{Time.now} about to kill -15 #{pid}"
-      ret = Process.kill(-15, pid) # TERM
-      $stderr.puts "WARN:  #{Time.now} sent kill -15 #{pid} ret=#{ret}"
+      $stderr.puts "WARN:  #{Time.now} about to kill -9 #{pid}"
+      ret = Process.kill(-9, pid) # SIGKILL
+      $stderr.puts "WARN:  #{Time.now} sent kill -9 #{pid} ret=#{ret}"
     rescue StandardError => e
       $stderr.puts "WARN:  #{Time.now} ret=#{ret} exception: #{e}"
     end

Reply via email to