mirror of
https://github.com/monero-project/monero.git
synced 2025-08-11 08:40:05 -04:00
Merge pull request #308
35b160e
fix ^D exit for bitmonerod (moneromooo-monero)
This commit is contained in:
commit
f89cf1df87
4 changed files with 12 additions and 12 deletions
|
@ -196,11 +196,11 @@ bool t_command_server::process_command_vec(const std::vector<std::string>& cmd)
|
|||
return result;
|
||||
}
|
||||
|
||||
bool t_command_server::start_handling()
|
||||
bool t_command_server::start_handling(std::function<void(void)> exit_handler)
|
||||
{
|
||||
if (m_is_rpc) return false;
|
||||
|
||||
m_command_lookup.start_handling("", get_commands_str());
|
||||
m_command_lookup.start_handling("", get_commands_str(), exit_handler);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ public:
|
|||
|
||||
bool process_command_vec(const std::vector<std::string>& cmd);
|
||||
|
||||
bool start_handling();
|
||||
bool start_handling(std::function<void(void)> exit_handler = NULL);
|
||||
|
||||
void stop_handling();
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ bool t_daemon::run(bool interactive)
|
|||
if (interactive)
|
||||
{
|
||||
rpc_commands = new daemonize::t_command_server(0, 0, false, mp_internals->rpc.get_server());
|
||||
rpc_commands->start_handling();
|
||||
rpc_commands->start_handling(std::bind(&daemonize::t_daemon::stop, this));
|
||||
}
|
||||
|
||||
mp_internals->p2p.run(); // blocks until p2p goes down
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue