mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-14 08:16:17 -04:00
Unlink PID file on exit
This commit is contained in:
parent
be4286b2e8
commit
ed0ff0c136
@ -616,6 +616,13 @@ int main(int argc, char *argv[]) {
|
|||||||
DPRINTF(E_LOG,L_MAIN|L_DB,"Closing database\n");
|
DPRINTF(E_LOG,L_MAIN|L_DB,"Closing database\n");
|
||||||
db_deinit();
|
db_deinit();
|
||||||
|
|
||||||
|
if (!foreground)
|
||||||
|
{
|
||||||
|
ret = unlink(pidfile);
|
||||||
|
if (ret < 0)
|
||||||
|
DPRINTF(E_WARN, L_MAIN, "Could not unlink PID file %s: %s\n", pidfile, strerror(errno));
|
||||||
|
}
|
||||||
|
|
||||||
DPRINTF(E_LOG,L_MAIN,"Done!\n");
|
DPRINTF(E_LOG,L_MAIN,"Done!\n");
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user