summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-08-09 21:09:18 +0200
committermkanat%bugzilla.org <>2009-08-09 21:09:18 +0200
commitcaab33ef1a7e8da98fa1681d2e80b5c6f4a19959 (patch)
tree6f1c1de545e6b23778c2ca59ecaca5612f82a0e6
parent9726fb767a8016e6205fbaf24492049b67fb74e3 (diff)
downloadbugzilla-caab33ef1a7e8da98fa1681d2e80b5c6f4a19959.tar.gz
bugzilla-caab33ef1a7e8da98fa1681d2e80b5c6f4a19959.tar.xz
Bug 509328: Make jobqueue.pl respond to the TERM signal
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=justdave, a=mkanat
-rw-r--r--Bugzilla/JobQueue/Runner.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/Bugzilla/JobQueue/Runner.pm b/Bugzilla/JobQueue/Runner.pm
index 06b8a7a94..ec2719638 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;