Skip to content
Snippets Groups Projects
Commit b1645f75 authored by Axel Naumann's avatar Axel Naumann
Browse files

Quit after subproc, unlink only if created.

parent 38455102
Branches
Tags
No related merge requests found
...@@ -460,9 +460,11 @@ Bool_t TDocMacroDirective::GetResult(TString& result) ...@@ -460,9 +460,11 @@ Bool_t TDocMacroDirective::GetResult(TString& result)
} }
TString subProcInputFile = CreateSubprocessInputFile(); TString subProcInputFile = CreateSubprocessInputFile();
if (subProcInputFile.IsEmpty()) return kFALSE;
subProcInputFile.ReplaceAll("\\", "\\\\"); subProcInputFile.ReplaceAll("\\", "\\\\");
subProcInputFile.ReplaceAll("\"", "\\\""); subProcInputFile.ReplaceAll("\"", "\\\"");
TString invoc("root.exe -l "); TString invoc("root.exe -l -q ");
if (wantBatch) { if (wantBatch) {
invoc += "-b "; invoc += "-b ";
} }
...@@ -473,7 +475,8 @@ Bool_t TDocMacroDirective::GetResult(TString& result) ...@@ -473,7 +475,8 @@ Bool_t TDocMacroDirective::GetResult(TString& result)
if (exitCode && gDebug > 0) { if (exitCode && gDebug > 0) {
Info("GetResult()", "Subprocess exited with status %d\n", exitCode); Info("GetResult()", "Subprocess exited with status %d\n", exitCode);
} else { } else if (!fIsFilename) {
// we have created the input file.
gSystem->Unlink(subProcInputFile); gSystem->Unlink(subProcInputFile);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment