diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-07-28 00:43:43 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-07-28 01:04:21 -0700 |
commit | f78f92c58ae49143c64b1cfec320d0579a07f859 (patch) | |
tree | c8b681436ac710840c8e672c802e95034fe0ba32 /020run.cc | |
parent | a953a9fcaa097ec9027b97331d51b90490adb490 (diff) | |
download | mu-f78f92c58ae49143c64b1cfec320d0579a07f859.tar.gz |
1863 - two bugfixes in deleting sandboxes
Forgot to show screen after delete, and 'release' events were causing double deletions.
Diffstat (limited to '020run.cc')
-rw-r--r-- | 020run.cc | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/020run.cc b/020run.cc index 08aa2b74..5f1e15c1 100644 --- a/020run.cc +++ b/020run.cc @@ -131,18 +131,28 @@ if (argc > 1) { :(before "End Main") if (!Run_tests) { setup(); -//? Trace_file = "interactive"; //? 1 -//? START_TRACING_UNTIL_END_OF_SCOPE; -//? Trace_stream->dump_layer = "all"; //? 2 +//? Trace_file = "interactive"; //? 2 +//? START_TRACING_UNTIL_END_OF_SCOPE; //? 2 +//? Trace_stream->collect_layer = "app"; //? 1 transform_all(); recipe_ordinal r = Recipe_ordinal[string("main")]; -//? Trace_stream->dump_layer = "all"; //? 1 if (r) run(r); //? dump_memory(); //? 1 teardown(); } :(code) +void cleanup_main() { + if (!Trace_file.empty()) { + ofstream fout(Trace_file.c_str()); + fout << Trace_stream->readable_contents(""); + fout.close(); + } +} +:(before "End One-time Setup") +atexit(cleanup_main); + +:(code) void load_permanently(string filename) { ifstream fin(filename.c_str()); fin.peek(); |