diff options
| author | Gavin Andresen <[email protected]> | 2011-04-15 12:09:50 -0400 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2011-04-15 12:09:50 -0400 |
| commit | bf3a0902ef98365d803e4a03853dbf0f83511026 (patch) | |
| tree | 02957d6a4731a99b93232631285b363ad85d1dcb /init.cpp | |
| parent | Merge branch 'localefix' (diff) | |
| parent | pidfile support for daemon (diff) | |
| download | discoin-bf3a0902ef98365d803e4a03853dbf0f83511026.tar.xz discoin-bf3a0902ef98365d803e4a03853dbf0f83511026.zip | |
Merge branch 'master' of https://github.com/gjs278/bitcoin
Diffstat (limited to 'init.cpp')
| -rw-r--r-- | init.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -41,6 +41,7 @@ void Shutdown(void* parg) DBFlush(false); StopNode(); DBFlush(true); + boost::filesystem::remove(GetPidFile()); CreateThread(ExitTimeout, NULL); Sleep(50); printf("Bitcoin exiting\n\n"); @@ -151,6 +152,7 @@ bool AppInit2(int argc, char* argv[]) " bitcoin [options] help <command> \t\t " + _("Get help for a command\n") + _("Options:\n") + " -conf=<file> \t\t " + _("Specify configuration file (default: bitcoin.conf)\n") + + " -pid=<file> \t\t " + _("Specify pid file (default: bitcoind.pid)\n") + " -gen \t\t " + _("Generate coins\n") + " -gen=0 \t\t " + _("Don't generate coins\n") + " -min \t\t " + _("Start minimized\n") + @@ -251,7 +253,10 @@ bool AppInit2(int argc, char* argv[]) return false; } if (pid > 0) + { + CreatePidFile(GetPidFile(), pid); return true; + } pid_t sid = setsid(); if (sid < 0) |