[ARVADOS] updated: b1b9ffbb5e49d04c058d11702ecd240b1ef8a958

git at public.curoverse.com git at public.curoverse.com
Thu Apr 3 15:25:38 EDT 2014


Summary of changes:
 sdk/cli/bin/crunch-job |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

       via  b1b9ffbb5e49d04c058d11702ecd240b1ef8a958 (commit)
      from  bb511c0b9c011610d38dc10f6312a6b83720aa42 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit b1b9ffbb5e49d04c058d11702ecd240b1ef8a958
Author: Tim Pierce <twp at curoverse.com>
Date:   Thu Apr 3 15:25:35 2014 -0400

    Use a simple 'open' for fetch_block (freeing up an extra filehandle). refs #2325, refs #2221

diff --git a/sdk/cli/bin/crunch-job b/sdk/cli/bin/crunch-job
index e81628c..2f8623b 100755
--- a/sdk/cli/bin/crunch-job
+++ b/sdk/cli/bin/crunch-job
@@ -1061,11 +1061,12 @@ sub process_stderr
 sub fetch_block
 {
   my $hash = shift;
-  my ($child_out, $child_in, $output_block);
+  my ($child_out, $output_block);
 
-  my $pid = open2($child_out, $child_in, 'arv', 'keep', 'get', $hash);
-  sysread($child_out, $output_block, 64 * 1024 * 1024);
-  waitpid($pid, 0);
+  my $cmd = "arv keep get \Q$hash\E";
+  open($keep, '-|', $cmd) or die "fetch_block: $cmd: $!"
+  sysread($keep, $output_block, 64 * 1024 * 1024);
+  close $keep;
   return $output_block;
 }
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list