diff --git a/mythtv/libs/libmythbase/mythcommandlineparser.cpp b/mythtv/libs/libmythbase/mythcommandlineparser.cpp index 3bbac88..831fc0a 100644 --- a/mythtv/libs/libmythbase/mythcommandlineparser.cpp +++ b/mythtv/libs/libmythbase/mythcommandlineparser.cpp @@ -2676,11 +2676,19 @@ int MythCommandLineParser::Daemonize(void) if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) LOG(VB_GENERAL, LOG_WARNING, "Unable to ignore SIGPIPE"); +#if CONFIG_DARWIN + if (toBool("daemon")) + { + cerr << "Daemonizing is unavaible in OSX" << ENO_STR << endl; + LOG(VB_GENERAL, LOG_WARNING, "Unable to daemonize"); + } +#else if (toBool("daemon") && (daemon(0, 1) < 0)) { cerr << "Failed to daemonize: " << ENO_STR << endl; return GENERIC_EXIT_DAEMONIZING_ERROR; } +#endif QString username = toString("username"); if (!username.isEmpty() && !setUser(username))