diff options
author | Tristan Gingold <gingold@adacore.com> | 2015-06-23 20:48:07 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2015-06-23 20:48:07 +0000 |
commit | 8289f048f0d5e6b7fa39857f34aacad816eede43 (patch) | |
tree | 89f706923f9da9718596348b3f89f9f65dd6ed60 /gcc/collect-utils.c | |
parent | 7d17de7f732927e65e35b375c4fcb193082446af (diff) | |
download | gcc-8289f048f0d5e6b7fa39857f34aacad816eede43.zip gcc-8289f048f0d5e6b7fa39857f34aacad816eede43.tar.gz gcc-8289f048f0d5e6b7fa39857f34aacad816eede43.tar.bz2 |
collect-utils.c (collect_wait): Unlink the response file here instead of...
* collect-utils.c (collect_wait): Unlink the response file here
instead of...
(do_wait): ...here.
(utils_cleanup): ...and here.
From-SVN: r224858
Diffstat (limited to 'gcc/collect-utils.c')
-rw-r--r-- | gcc/collect-utils.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/gcc/collect-utils.c b/gcc/collect-utils.c index 6bbe9eb..517a075 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); } |