chiark
/
gitweb
/
~ian
/
chiark-utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
git-cache-proxy: Move $SIG{ALRM} setting to global
[chiark-utils.git]
/
scripts
/
git-cache-proxy
diff --git
a/scripts/git-cache-proxy
b/scripts/git-cache-proxy
index 051888a9682bd49df717e155605d126562068395..518ca9a8fe8c34b816b34e1a0dd3b176e703bbbc 100755
(executable)
--- a/
scripts/git-cache-proxy
+++ b/
scripts/git-cache-proxy
@@
-145,6
+145,8
@@
sub fail ($) {
exit 0;
}
+$SIG{ALRM} = sub { fail "timeout" };
+
sub gitfail ($) {
my ($msg) = @_;
close LOCK;
@@
-251,7
+253,6
@@
sub servinfo ($) {
}
sub readcommand () {
- $SIG{ALRM} = sub { fail "timeout" };
alarm 30;
my $hex_len = xread 4;