daemonization.

This commit is contained in:
orignal 2014-07-02 13:48:45 -04:00
parent 3a864cb6c5
commit 334c92bb49
6 changed files with 74 additions and 46 deletions

10
i2p.cpp
View file

@ -5,11 +5,13 @@
int main( int argc, char* argv[] )
{
Daemon.init(argc, argv);
Daemon.start();
while (Daemon.running)
if (Daemon.start())
{
//TODO Meeh: Find something better to do here.
std::this_thread::sleep_for (std::chrono::seconds(1));
while (Daemon.running)
{
//TODO Meeh: Find something better to do here.
std::this_thread::sleep_for (std::chrono::seconds(1));
}
}
Daemon.stop();
return EXIT_SUCCESS;