chiark
/
gitweb
/
~ian
/
chiark-utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
79a49c8
)
git-cache-proxy: Move $SIG{ALRM} setting to global
author
Ian Jackson
<ian.jackson@eu.citrix.com>
Tue, 11 Feb 2020 17:32:25 +0000
(17:32 +0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Tue, 11 Feb 2020 18:57:35 +0000
(18:57 +0000)
This is actually used in multiple places. It should be set globally.
No overall functional change with the current code.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
scripts/git-cache-proxy
patch
|
blob
|
history
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;