diff options
author | Chris Johns <chrisj@rtems.org> | 2018-04-14 14:15:07 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2018-04-14 14:15:07 +1000 |
commit | 82c8788b111a4392a56414f8f421ba26ded5d0fd (patch) | |
tree | 757c4d3a9f27b56c13687862d66497f51dba5d18 /rtemstoolkit/rld-outputter.cpp | |
parent | b7c4753de0c17201be0ca047e2a7e320616132cb (diff) |
rtemstoolkit/rtl-file: Remove a file on close if requested
Close #3395
Diffstat (limited to 'rtemstoolkit/rld-outputter.cpp')
-rw-r--r-- | rtemstoolkit/rld-outputter.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/rtemstoolkit/rld-outputter.cpp b/rtemstoolkit/rld-outputter.cpp index 600aedc..9343180 100644 --- a/rtemstoolkit/rld-outputter.cpp +++ b/rtemstoolkit/rld-outputter.cpp @@ -332,6 +332,7 @@ namespace rld catch (...) { out.close (); + ::unlink (name.c_str ()); throw; } @@ -410,6 +411,7 @@ namespace rld catch (...) { delete [] buffer; + app.remove_on_close (); app.close (); throw; } @@ -427,13 +429,13 @@ namespace rld } void - application (const std::string& name, - const std::string& entry, - const std::string& exit, - const files::object_list& dependents, - const files::cache& cache, - const symbols::table& symbols, - bool one_file) + rap_application (const std::string& name, + const std::string& entry, + const std::string& exit, + const files::object_list& dependents, + const files::cache& cache, + const symbols::table& symbols, + bool one_file) { if (rld::verbose () >= RLD_VERBOSE_INFO) std::cout << "outputter:application: " << name << std::endl; @@ -458,6 +460,7 @@ namespace rld } catch (...) { + app.remove_on_close (); app.close (); throw; } |