diff options
author | Levi Pearson <levi.pearson@harman.com> | 2017-03-30 19:17:51 -0600 |
---|---|---|
committer | Levi Pearson <levi.pearson@harman.com> | 2017-03-30 19:17:51 -0600 |
commit | a046e72fd47b5e88befef3a73092a05216338973 (patch) | |
tree | 8dad5aa2fc4bbd5b192dc471d82b5d4ca8e2ade2 /daemons | |
parent | 742017b7015cb3d784cbd3d9ad2280021399a1ab (diff) | |
download | Open-AVB-a046e72fd47b5e88befef3a73092a05216338973.tar.gz |
Fix log file creation for maap_daemon
While testing on a different Linux, the build failed due to a missing argument
to the open function. This also makes the log file group- and other-readable.
Also fixed a warning about discarding the return value of chdir.
Diffstat (limited to 'daemons')
-rw-r--r-- | daemons/maap/linux/src/maap_daemon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/daemons/maap/linux/src/maap_daemon.c b/daemons/maap/linux/src/maap_daemon.c index 246a9663..3de6a619 100644 --- a/daemons/maap/linux/src/maap_daemon.c +++ b/daemons/maap/linux/src/maap_daemon.c @@ -198,7 +198,7 @@ int main(int argc, char *argv[]) } open("/dev/null", O_RDONLY); open("/dev/null", O_WRONLY); - open(logfile, O_WRONLY|O_CREAT|O_APPEND); + open(logfile, O_WRONLY|O_CREAT|O_APPEND, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); } if (listenport == NULL) @@ -870,7 +870,7 @@ static int do_daemonize(void) } umask(0); - chdir("/"); + x = chdir("/"); /* Close all open file descriptors */ for (x = sysconf(_SC_OPEN_MAX); x>=0; x--) { |