Allow rtorrent to run as a daemon, slightly modified version of the PR provided by sallyswiss

This commit is contained in:
zp
2016-06-19 02:06:30 -05:00
parent 9abcea84c7
commit c01709fa27
4 changed files with 99 additions and 70 deletions
+6 -2
View File
@@ -118,7 +118,9 @@ Control::initialize() {
m_ui->init(this);
m_inputStdin->insert(torrent::main_thread()->poll());
if(!display::Canvas::daemon()) {
m_inputStdin->insert(torrent::main_thread()->poll());
}
}
void
@@ -128,7 +130,9 @@ Control::cleanup() {
priority_queue_erase(&taskScheduler, &m_taskShutdown);
m_inputStdin->remove(torrent::main_thread()->poll());
if(!display::Canvas::daemon()) {
m_inputStdin->remove(torrent::main_thread()->poll());
}
m_core->download_store()->disable();