mirror of
https://github.com/owntone/owntone-server.git
synced 2025-02-03 09:56:00 -05: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)
|
||||
close(fd);
|
||||
|
||||
chdir("/");
|
||||
ret = chdir("/");
|
||||
if (ret < 0)
|
||||
DPRINTF(E_WARN, L_MAIN, "chdir() failed: %s\n", strerror(errno));
|
||||
|
||||
umask(0);
|
||||
|
||||
fprintf(fp, "%d\n", getpid());
|
||||
|
Loading…
x
Reference in New Issue
Block a user