projects
/
arvados.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b658d9
)
6094: Avoid SIGPIPE by consuming DATA section even when it's not needed.
author
Tom Clegg <tom@curoverse.com>
Fri, 22 May 2015 19:39:00 +0000
(15:39 -0400)
committer
Tom Clegg <tom@curoverse.com>
Fri, 22 May 2015 19:39:00 +0000
(15:39 -0400)
sdk/cli/bin/crunch-job
patch
|
blob
|
history
diff --git
a/sdk/cli/bin/crunch-job
b/sdk/cli/bin/crunch-job
index 6ae04812325994678dad9e29d736b5556731f4f4..ae9d1e2c1ef5322ea8a70e882960ebb07b73135c 100755
(executable)
--- a/
sdk/cli/bin/crunch-job
+++ b/
sdk/cli/bin/crunch-job
@@
-1983,6
+1983,12
@@
open L, ">", "$destdir.lock" or die "$destdir.lock: $!";
flock L, LOCK_EX;
if (readlink ("$destdir.commit") eq $commit && -d $destdir) {
# This version already installed -> nothing to do.
+
+ # We must consume our DATA section, though: otherwise the process
+ # feeding it to us will get SIGPIPE.
+ my $buf;
+ while (read(DATA, $buf, 65536)) { }
+
exit(0);
}