diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/sidekiq_signals.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/gitlab/sidekiq_signals.rb b/lib/gitlab/sidekiq_signals.rb index b704ee9a0a9..82462544d07 100644 --- a/lib/gitlab/sidekiq_signals.rb +++ b/lib/gitlab/sidekiq_signals.rb @@ -35,8 +35,11 @@ module Gitlab # signals from outside the process group, but that isn't fatal. def self.blindly_signal_pgroup!(signal) old_trap = trap(signal, 'IGNORE') - Process.kill(signal, "-#{Process.getpgrp}") - trap(signal, old_trap) + begin + Process.kill(signal, 0) + ensure + trap(signal, old_trap) + end end end end |