[ARVADOS] created: b4c2a96ed66c98cb5a07bd06138f755ae5675fb7

git at public.curoverse.com git at public.curoverse.com
Fri May 22 15:39:27 EDT 2015


        at  b4c2a96ed66c98cb5a07bd06138f755ae5675fb7 (commit)


commit b4c2a96ed66c98cb5a07bd06138f755ae5675fb7
Author: Tom Clegg <tom at curoverse.com>
Date:   Fri May 22 15:39:00 2015 -0400

    6094: Avoid SIGPIPE by consuming DATA section even when it's not needed.

diff --git a/sdk/cli/bin/crunch-job b/sdk/cli/bin/crunch-job
index 6ae0481..ae9d1e2 100755
--- 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);
 }
 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list