From 30158c77e99a099cbdd556bacbac18b431c3870c Mon Sep 17 00:00:00 2001 From: s_nakamoto Date: Tue, 23 Feb 2010 22:01:39 +0000 Subject: run as daemon without GUI, hooked wxApp::Initialize to ignore gtk-init-check failure if no GUI, fork to daemonize, rpc getinfo, getconnectioncount, getbalance, getgenerate, setgenerate, -- version 0.2.6 --- util.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'util.cpp') diff --git a/util.cpp b/util.cpp index 40f7af343..6ea735d1e 100644 --- a/util.cpp +++ b/util.cpp @@ -13,6 +13,7 @@ bool fPrintToDebugger = false; char pszSetDataDir[MAX_PATH] = ""; bool fShutdown = false; bool fDaemon = false; +bool fCommandLine = false; @@ -500,7 +501,8 @@ void PrintException(std::exception* pex, const char* pszThread) char pszMessage[1000]; FormatException(pszMessage, pex, pszThread); printf("\n\n************************\n%s\n", pszMessage); - if (wxTheApp) + fprintf(stderr, "\n\n************************\n%s\n", pszMessage); + if (wxTheApp && !fDaemon) wxMessageBox(pszMessage, "Error", wxOK | wxICON_ERROR); throw; //DebugBreak(); -- cgit v1.2.3