chiark / gitweb /
Work around #793471 (madness with $SIG{__WARN__} and Perl's system builtin): move...
[dgit.git] / infra / dgit-repos-server
index 92f197b0b001b31bc5dd11907ab7ab1c1359a00f..9705a6420a628298c5c95857042ed3c74c94d941 100755 (executable)
@@ -33,7 +33,9 @@
 # (With --cron AUTH-SPEC is not used and may be the empty string.)
 
 use strict;
 # (With --cron AUTH-SPEC is not used and may be the empty string.)
 
 use strict;
-$SIG{__WARN__} = sub { die $_[0]; };
+
+use Debian::Dgit qw(:DEFAULT :policyflags);
+setup_sigwarn();
 
 # DGIT-REPOS-DIR contains:
 # git tree (or other object)      lock (in acquisition order, outer first)
 
 # DGIT-REPOS-DIR contains:
 # git tree (or other object)      lock (in acquisition order, outer first)
@@ -189,8 +191,6 @@ use Fcntl qw(:flock);
 use File::Path qw(rmtree);
 use File::Temp qw(tempfile);
 
 use File::Path qw(rmtree);
 use File::Temp qw(tempfile);
 
-use Debian::Dgit qw(:DEFAULT :policyflags);
-
 initdebug('');
 
 our $func;
 initdebug('');
 
 our $func;