Commit 2c7fb879 authored by Tikhomirov Pavel's avatar Tikhomirov Pavel Committed by Pavel Emelyanov

chdir: need to check return value

otherwise it won't compile:

util.c: In function ‘cr_daemon’:
util.c:594:8: error: ignoring return value of ‘chdir’, declared
with attribute warn_unused_result [-Werror=unused-result]
   chdir("/");
        ^
Signed-off-by: 's avatarTikhomirov Pavel <snorcht@gmail.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent d8071ffd
......@@ -591,7 +591,8 @@ int cr_daemon(int nochdir, int noclose)
setsid();
if (!nochdir)
chdir("/");
if (chdir("/") == -1)
pr_perror("Can't change directory");
if (!noclose) {
int fd;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment