diff --git a/checkin_notes b/checkin_notes index 7c29894f48..e1190a7954 100644 --- a/checkin_notes +++ b/checkin_notes @@ -763,3 +763,11 @@ David 18 June 2008 wrapper/ wrapper.C + +David 19 June 2008 + - wrapper, Win: put quotes around program name in command-line arg + to CreateProcess() (in case it contains spaces) + - wrapper: close files + + wrapper/ + wrapper.C diff --git a/wrapper/wrapper.C b/wrapper/wrapper.C index 7cf2278a29..b3fff1b119 100644 --- a/wrapper/wrapper.C +++ b/wrapper/wrapper.C @@ -174,6 +174,7 @@ int parse_job_file() { continue; } if (!strcmp(tag, "/job_desc")) { + fclose(f); return 0; } if (!strcmp(tag, "task")) { @@ -184,6 +185,7 @@ int parse_job_file() { } } } + fclose(f); return ERR_XML_PARSE; } @@ -274,7 +276,7 @@ int TASK::run(int argct, char** argvt) { slash_to_backslash(app_path); memset(&process_info, 0, sizeof(process_info)); memset(&startup_info, 0, sizeof(startup_info)); - command = app_path + string(" ") + command_line; + command = string("\"") + app_path + string("\" ") + command_line; // pass std handles to app // @@ -501,6 +503,7 @@ void read_checkpoint(int& ntasks, double& cpu) { FILE* f = fopen(CHECKPOINT_FILENAME, "r"); if (!f) return; int n = fscanf(f, "%d %lf", &nt, &c); + fclose(f); if (n != 2) return; ntasks = nt; cpu = c;