diff options
| author | paybee <dev@payb.ee> | 2014-05-26 11:46:09 +0200 |
|---|---|---|
| committer | paybee <dev@payb.ee> | 2014-05-26 11:46:09 +0200 |
| commit | 785814cb1007f84da3a723c10d778206dbf2fb31 (patch) | |
| tree | c5012f16079e4129c871cb33a9d11afd9a2d370b /src | |
| parent | b77470a5c0917bc4d387301cdb9d467f3232d90b (diff) | |
| download | monzero-core-785814cb1007f84da3a723c10d778206dbf2fb31.tar.gz monzero-core-785814cb1007f84da3a723c10d778206dbf2fb31.tar.xz monzero-core-785814cb1007f84da3a723c10d778206dbf2fb31.zip | |
simplewallet exits when COMMAND is given as a command-line argument
Diffstat (limited to 'src')
| -rw-r--r-- | src/simplewallet/simplewallet.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 0f84b81de..cc10de5cd 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -1054,14 +1054,20 @@ int main(int argc, char* argv[]) std::vector<std::string> command = command_line::get_arg(vm, arg_command); if (!command.empty()) + { w.process_command(command); - - tools::signal_handler::install([&w] { w.stop(); - }); - w.run(); + w.deinit(); + } + else + { + tools::signal_handler::install([&w] { + w.stop(); + }); + w.run(); - w.deinit(); + w.deinit(); + } } return 1; //CATCH_ENTRY_L0("main", 1); |
