diff options
author | Stan Hu <stanhu@gmail.com> | 2019-03-07 13:18:41 +0000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-03-07 13:18:41 +0000 |
commit | 2b86f45c5cbdf78dda698e1e6db4958b377c0e60 (patch) | |
tree | 8f971b34020f337d0c9ca5d153f34be07d5276e2 /lib | |
parent | 5cea1e8b8007da95995cda682b5f0d96b0c7f10c (diff) | |
parent | 12bc7e0bab2ba1e0678066f5394029213ca40333 (diff) | |
download | gitlab-ce-2b86f45c5cbdf78dda698e1e6db4958b377c0e60.tar.gz |
Merge branch 'fix-sidekiq-process-group-killing' into 'master'
Fix Sidekiq process group killing
See merge request gitlab-org/gitlab-ce!25866
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 |