From: mkanat%bugzilla.org <> Date: Sun, 9 Aug 2009 19:11:34 +0000 (+0000) Subject: Bug 509328: Make jobqueue.pl respond to the TERM signal X-Git-Tag: bugzilla-3.4.2~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df3a3d1c8a27d831c58b028c58049b168df3ed01;p=thirdparty%2Fbugzilla.git Bug 509328: Make jobqueue.pl respond to the TERM signal Patch by Max Kanat-Alexander r=justdave, a=mkanat --- diff --git a/Bugzilla/JobQueue/Runner.pm b/Bugzilla/JobQueue/Runner.pm index 06b8a7a94e..ec27196384 100644 --- a/Bugzilla/JobQueue/Runner.pm +++ b/Bugzilla/JobQueue/Runner.pm @@ -67,6 +67,12 @@ sub gd_check { print get_text('job_queue_depth', { count => $count }) . "\n"; } +sub gd_setup_signals { + my $self = shift; + $self->SUPER::gd_setup_signals(); + $SIG{TERM} = sub { $self->gd_quit_event(); } +} + sub gd_run { my $self = shift;