Skip to content

Commit

Permalink
Check for kill -9 completion [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbASF committed Dec 18, 2023
1 parent 6f74534 commit cf3d288
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/site-scan.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit cf3d288

Please sign in to comment.