mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-13 16:03:23 -05: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");
|
||||
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");
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
|
Loading…
Reference in New Issue
Block a user