mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-22 05:26:17 +02:00
return proper exit code
This commit is contained in:
parent
d4e03989fb
commit
833a1957fc
2 changed files with 6 additions and 3 deletions
|
@ -70,6 +70,7 @@ int main (int argc, char **argv)
|
|||
#ifdef MACOS
|
||||
#pragma message "Warning: the macOS support is experimental and might not be maintained"
|
||||
#endif
|
||||
int exitcode = EXIT_SUCCESS;
|
||||
try
|
||||
{
|
||||
string soundcard("default");
|
||||
|
@ -234,13 +235,14 @@ int main (int argc, char **argv)
|
|||
catch (const std::exception& e)
|
||||
{
|
||||
logS(kLogErr) << "Exception: " << e.what() << std::endl;
|
||||
exitcode = EXIT_FAILURE;
|
||||
}
|
||||
|
||||
logS(kLogNotice) << "daemon terminated." << endl;
|
||||
#ifdef HAS_DAEMON
|
||||
daemonShutdown();
|
||||
#endif
|
||||
exit(EXIT_SUCCESS);
|
||||
exit(exitcode);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue