diff options
author | Nick Thomas <nick@gitlab.com> | 2019-03-07 15:37:59 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-03-07 15:37:59 +0300 |
commit | 12bc7e0bab2ba1e0678066f5394029213ca40333 (patch) | |
tree | c2e51f6d63dc5a5732a4164a27442654ee56e8a5 /lib | |
parent | 7bbdb2a29fbc7b8c9f879c42de7063adaa8313c7 (diff) |
Fix Sidekiq process group killing
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 |