mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-08 05:35:38 -04:00
Check chdir() return value to silence a warning
This commit is contained in:
parent
d231faff2d
commit
30e07abae3
@ -172,7 +172,10 @@ daemonize(int background, char *pidfile)
|
|||||||
if (fd > 2)
|
if (fd > 2)
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
chdir("/");
|
ret = chdir("/");
|
||||||
|
if (ret < 0)
|
||||||
|
DPRINTF(E_WARN, L_MAIN, "chdir() failed: %s\n", strerror(errno));
|
||||||
|
|
||||||
umask(0);
|
umask(0);
|
||||||
|
|
||||||
fprintf(fp, "%d\n", getpid());
|
fprintf(fp, "%d\n", getpid());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user