From: ebotcazou Date: Tue, 23 Jun 2015 20:48:07 +0000 (+0000) Subject: * collect-utils.c (collect_wait): Unlink the response file here X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f591a95d1532ac7791c146a8e55ba3a32b3e476f;p=thirdparty%2Fgcc.git * collect-utils.c (collect_wait): Unlink the response file here instead of... (do_wait): ...here. (utils_cleanup): ...and here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@224858 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5ab37bda5634..ab34ffcb2b20 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2015-06-23 Tristan Gingold + + * collect-utils.c (collect_wait): Unlink the response file here + instead of... + (do_wait): ...here. + (utils_cleanup): ...and here. + 2015-06-23 Richard Sandiford * df-scan.c: Don't include target-def.h. diff --git a/gcc/collect-utils.c b/gcc/collect-utils.c index 6bbe9eb86980..517a0757590d 100644 --- a/gcc/collect-utils.c +++ b/gcc/collect-utils.c @@ -68,6 +68,12 @@ collect_wait (const char *prog, struct pex_obj *pex) fatal_error (input_location, "can't get program status: %m"); pex_free (pex); + if (response_file && !save_temps) + { + unlink (response_file); + response_file = NULL; + } + if (status) { if (WIFSIGNALED (status)) @@ -90,12 +96,6 @@ do_wait (const char *prog, struct pex_obj *pex) int ret = collect_wait (prog, pex); if (ret != 0) fatal_error (input_location, "%s returned %d exit status", prog, ret); - - if (response_file && !save_temps) - { - unlink (response_file); - response_file = NULL; - } } @@ -224,7 +224,5 @@ utils_cleanup (bool from_signal) calls to maybe_unlink fails. */ cleanup_done = true; - if (response_file) - maybe_unlink (response_file); tool_cleanup (from_signal); }