mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-04 08:42:07 +00:00
Exit with failure if "--stop" fails. Also give the daemon a couple more seconds to clean up.
This commit is contained in:
parent
27d4696971
commit
e44d24e8c8
@ -148,7 +148,7 @@ static void stopDaemon() {
|
||||
kill(pid, SIGTERM);
|
||||
int count = 0;
|
||||
bool dead = false;
|
||||
while (!dead && count++ < 5) { /* try for 5 seconds */
|
||||
while (!dead && count++ < 7) { /* try for 7 seconds */
|
||||
if (kill(pid, 0) == 0) {
|
||||
std::cout << ".";
|
||||
std::cout.flush();
|
||||
@ -159,6 +159,9 @@ static void stopDaemon() {
|
||||
}
|
||||
}
|
||||
std::cout << (dead ? " success" : " failed") << "\n\n";
|
||||
if (!dead) {
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user