From 12b4f43793df9c84d0c107b6803972cd2f1fbcd1 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 13 Mar 2014 13:07:16 -0700 Subject: [PATCH] Condor interface: when unzipping output file, use job-specific name for temp file to avoid conflict between jobs --- samples/condor/boinc_gahp.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/samples/condor/boinc_gahp.cpp b/samples/condor/boinc_gahp.cpp index 162aaf6355..f8c69e2862 100644 --- a/samples/condor/boinc_gahp.cpp +++ b/samples/condor/boinc_gahp.cpp @@ -447,7 +447,7 @@ void handle_fetch_output(COMMAND& c) { if (zipped_output(td)) { // the job's output file is a zip archive. Get it and unzip // - sprintf(path, "%s/temp.zip", req.dir); + sprintf(path, "%s/%s_output.zip", req.dir, req.job_name); retval = get_output_file( project_url, authenticator, req.job_name, 0, path, error_msg ); @@ -455,10 +455,12 @@ void handle_fetch_output(COMMAND& c) { sprintf(buf, "get_output_file()\\ returned\\ %d\\ ", retval); s = string(buf) + escape_str(error_msg); } else { - sprintf(buf, "cd %s; unzip temp.zip", req.dir); + sprintf(buf, "cd %s; unzip %s_output.zip", req.dir, req.job_name); retval = system(buf); if (retval) { s = string("unzip\\ failed"); + } else { + unlink(path); } } } else if (req.fetch_all) {