diff options
author | Tim Smith <tsmith@chef.io> | 2020-09-09 20:44:21 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-09 20:44:21 -0700 |
commit | 8db3037f76c4095e27427dba2020effeb4cbffcd (patch) | |
tree | 7c9128cde99c9c5dd2ee09f8bee503f56e686aba /lib/mixlib/shellout/unix.rb | |
parent | 50ae416a3859691a21718a12a29129dae3d6099a (diff) | |
parent | e722fe8ca23533f83c3c6979c95bf2a160069c41 (diff) | |
download | mixlib-shellout-8db3037f76c4095e27427dba2020effeb4cbffcd.tar.gz |
Merge pull request #221 from chef/safe
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/mixlib/shellout/unix.rb')
-rw-r--r-- | lib/mixlib/shellout/unix.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mixlib/shellout/unix.rb b/lib/mixlib/shellout/unix.rb index b8f42e0..5900302 100644 --- a/lib/mixlib/shellout/unix.rb +++ b/lib/mixlib/shellout/unix.rb @@ -370,11 +370,11 @@ module Mixlib return if attempt_reap @terminate_reason = "Command exceeded allowed execution time, process terminated" - logger.error("Command exceeded allowed execution time, sending TERM") if logger + logger&.error("Command exceeded allowed execution time, sending TERM") Process.kill(:TERM, child_pgid) sleep 3 attempt_reap - logger.error("Command exceeded allowed execution time, sending KILL") if logger + logger&.error("Command exceeded allowed execution time, sending KILL") Process.kill(:KILL, child_pgid) reap |