|
|
@ -41,6 +41,7 @@ void Shutdown(void* parg) |
|
|
|
DBFlush(false); |
|
|
|
DBFlush(false); |
|
|
|
StopNode(); |
|
|
|
StopNode(); |
|
|
|
DBFlush(true); |
|
|
|
DBFlush(true); |
|
|
|
|
|
|
|
boost::filesystem::remove(GetPidFile()); |
|
|
|
CreateThread(ExitTimeout, NULL); |
|
|
|
CreateThread(ExitTimeout, NULL); |
|
|
|
Sleep(50); |
|
|
|
Sleep(50); |
|
|
|
printf("Bitcoin exiting\n\n"); |
|
|
|
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") + |
|
|
|
" bitcoin [options] help <command> \t\t " + _("Get help for a command\n") + |
|
|
|
_("Options:\n") + |
|
|
|
_("Options:\n") + |
|
|
|
" -conf=<file> \t\t " + _("Specify configuration file (default: bitcoin.conf)\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 \t\t " + _("Generate coins\n") + |
|
|
|
" -gen=0 \t\t " + _("Don't generate coins\n") + |
|
|
|
" -gen=0 \t\t " + _("Don't generate coins\n") + |
|
|
|
" -min \t\t " + _("Start minimized\n") + |
|
|
|
" -min \t\t " + _("Start minimized\n") + |
|
|
@ -251,7 +253,10 @@ bool AppInit2(int argc, char* argv[]) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
if (pid > 0) |
|
|
|
if (pid > 0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
CreatePidFile(GetPidFile(), pid); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
pid_t sid = setsid(); |
|
|
|
pid_t sid = setsid(); |
|
|
|
if (sid < 0) |
|
|
|
if (sid < 0) |
|
|
|