summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-07-23 15:49:28 -0700
committerGitHub <noreply@github.com>2018-07-23 15:49:28 -0700
commit94c0844c99f9a8a0c173516daf3c346524e6d7ab (patch)
treebaf4ceafc71e7fd522eaefe52bf1a468c86cdf60 /lib
parentb94ede6401acc708401101e3d0858b03b17125a8 (diff)
parent54d3a967952bf96537167bd61d6a038c32940842 (diff)
downloadmixlib-shellout-94c0844c99f9a8a0c173516daf3c346524e6d7ab.tar.gz
Merge pull request #158 from MsysTechnologiesllc/dh/MSYS-847_fix_bare_rescues
Fix a bare rescue on Windows
Diffstat (limited to 'lib')
-rw-r--r--lib/mixlib/shellout/windows.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mixlib/shellout/windows.rb b/lib/mixlib/shellout/windows.rb
index da49d4a..07d3fbc 100644
--- a/lib/mixlib/shellout/windows.rb
+++ b/lib/mixlib/shellout/windows.rb
@@ -122,7 +122,7 @@ module Mixlib
wmi = WmiLite::Wmi.new
kill_process_tree(process.process_id, wmi, logger)
Process.kill(:KILL, process.process_id)
- rescue
+ rescue SystemCallError
logger.warn("Failed to kill timed out process #{process.process_id}") if logger
end
@@ -357,7 +357,7 @@ module Mixlib
].join)
end
Process.kill(:KILL, instance.wmi_ole_object.processid)
- rescue
+ rescue SystemCallError
if logger
logger.debug([
"Failed to kill child process #{child_pid}::",