From 91c2f6e99b29de586592c70dd43fdf4207c8e9dd Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Sat, 16 Jun 2007 22:13:23 +0100 Subject: [PATCH] * Trap SIGINT and exit at a safe point in expire.in --- scripts/expire.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/expire.in b/scripts/expire.in index 2fbdcb77..f5e0a15d 100755 --- a/scripts/expire.in +++ b/scripts/expire.in @@ -33,6 +33,8 @@ foreach my $dir (@dirs) { my $bug; my $errors=0; +our $exit_now = 0; +$SIG{INT} = sub {$exit_now=1;} #process each bug (ie, status file) while (length($bug=shift(@list))) { # Weeeee. @@ -44,6 +46,7 @@ while (length($bug=shift(@list))) { $errors=1; print STDERR "Unable to archive bug# $bug which I thought I could archive:\n$@\n"; } + last if $exit_now; } exit $errors; -- 2.39.5