From b5311dd121c107cc32b03f2badb58d094c3e782a Mon Sep 17 00:00:00 2001 From: ps Date: Mon, 17 Jan 2011 20:56:31 +0000 Subject: [PATCH] ifdef out a few unix specifics for win32 --- src/hermes.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/hermes.cpp b/src/hermes.cpp index c1d6cf3..baabc03 100644 --- a/src/hermes.cpp +++ b/src/hermes.cpp @@ -234,6 +234,7 @@ main // wait for all threads to finish LINF("Waiting for threads to finish"); + #ifndef WIN32 while(children.size()) { if(false==cfg.getBackground()) @@ -243,11 +244,14 @@ main } sleep(1); } + #endif //WIN32 if(cfg.getCleanDb()) pthread_join(cleaner_thread,NULL); + #ifndef WIN32 if(false==cfg.getBackground()) cout << endl; + #endif //WIN32 #ifdef HAVE_SPF Spf::deinitialize(); @@ -320,6 +324,7 @@ void *cleaner_thread_run(void *) } next_run+=3600; } + #ifndef WIN32 if(false==cfg.getBackground()) { if(!(now%10)) //echo info each 10 seconds @@ -335,6 +340,7 @@ void *cleaner_thread_run(void *) cout << ss.str(); } } + #endif //WIN32 sleep(1); } db.close(); @@ -375,8 +381,7 @@ void *thread_main(void *info_stack) } catch(Exception &e) { - if(false==cfg.getBackground()) - LDEB(e); + LDEB(e); } return NULL; } @@ -386,8 +391,10 @@ void exit_requested(int) if(!quit) { quit=true; + #ifndef WIN32 if(false==cfg.getBackground()) cout << "Hit control+c again to force-quit" << endl; + #endif //WIN32 } else exit(-1);