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 cf3d2884 Check for kill -9 completion [skip ci]
cf3d2884 is described below
commit cf3d2884448b77bb8c9c7d03dace2ce2e35bf757
Author: Sebb <[email protected]>
AuthorDate: Mon Dec 18 11:55:05 2023 +0000
Check for kill -9 completion [skip ci]
---
tools/site-scan.rb | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/site-scan.rb b/tools/site-scan.rb
index a2029492..e45a1aa0 100755
--- a/tools/site-scan.rb
+++ b/tools/site-scan.rb
@@ -243,6 +243,12 @@ def exec_with_timeout(cmd, timeout)
$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}"
+ thrd = reaper.join 5 # allow some time for process to exit
+ if thrd
+ $stderr.puts "WARN: #{Time.now} process completed #{thrd.value}"
+ else
+ $stderr.puts "ERROR: #{Time.now} failed to kill -9 #{pid}"
+ end
end
rescue StandardError => e
$stderr.puts "WARN: #{Time.now} ret=#{ret} exception: #{e}"