diff options
Diffstat (limited to 'lib/mixlib/shellout/windows.rb')
-rw-r--r-- | lib/mixlib/shellout/windows.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/mixlib/shellout/windows.rb b/lib/mixlib/shellout/windows.rb index 1bc8b13..1612b09 100644 --- a/lib/mixlib/shellout/windows.rb +++ b/lib/mixlib/shellout/windows.rb @@ -111,6 +111,12 @@ module Mixlib when WAIT_TIMEOUT # Kill the process if (Time.now - start_wait) > timeout + begin + Process.kill(:KILL, process.process_id) + rescue Errno::EIO + logger.warn("Failed to kill timed out process #{process.process_id}") if logger + end + raise Mixlib::ShellOut::CommandTimeout, "command timed out:\n#{format_for_exception}" end |