|
|
@ -139,6 +139,10 @@ bool AppInit(int argc, char* argv[])
|
|
|
|
if (gArgs.GetBoolArg("-daemon", false))
|
|
|
|
if (gArgs.GetBoolArg("-daemon", false))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
#if HAVE_DECL_DAEMON
|
|
|
|
#if HAVE_DECL_DAEMON
|
|
|
|
|
|
|
|
#if defined(MAC_OSX)
|
|
|
|
|
|
|
|
#pragma GCC diagnostic push
|
|
|
|
|
|
|
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
|
|
|
|
|
|
|
#endif
|
|
|
|
fprintf(stdout, "Bitcoin server starting\n");
|
|
|
|
fprintf(stdout, "Bitcoin server starting\n");
|
|
|
|
|
|
|
|
|
|
|
|
// Daemonize
|
|
|
|
// Daemonize
|
|
|
@ -146,6 +150,9 @@ bool AppInit(int argc, char* argv[])
|
|
|
|
fprintf(stderr, "Error: daemon() failed: %s\n", strerror(errno));
|
|
|
|
fprintf(stderr, "Error: daemon() failed: %s\n", strerror(errno));
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#if defined(MAC_OSX)
|
|
|
|
|
|
|
|
#pragma GCC diagnostic pop
|
|
|
|
|
|
|
|
#endif
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
fprintf(stderr, "Error: -daemon is not supported on this operating system\n");
|
|
|
|
fprintf(stderr, "Error: -daemon is not supported on this operating system\n");
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|