summaryrefslogtreecommitdiff
path: root/lib/mixlib/shellout/unix.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2020-09-09 20:44:21 -0700
committerGitHub <noreply@github.com>2020-09-09 20:44:21 -0700
commit8db3037f76c4095e27427dba2020effeb4cbffcd (patch)
tree7c9128cde99c9c5dd2ee09f8bee503f56e686aba /lib/mixlib/shellout/unix.rb
parent50ae416a3859691a21718a12a29129dae3d6099a (diff)
parente722fe8ca23533f83c3c6979c95bf2a160069c41 (diff)
downloadmixlib-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.rb4
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