]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 509328: Make jobqueue.pl respond to the TERM signal
authormkanat%bugzilla.org <>
Sun, 9 Aug 2009 19:11:34 +0000 (19:11 +0000)
committermkanat%bugzilla.org <>
Sun, 9 Aug 2009 19:11:34 +0000 (19:11 +0000)
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=justdave, a=mkanat

Bugzilla/JobQueue/Runner.pm

index 06b8a7a94e8d9b77720e45ee615fa2863e578025..ec27196384aa16863c09ac507cbe243ba349319b 100644 (file)
@@ -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;