Currently para_audiod and para_server won't start in the background
if no logfile is specified, so "-dL /dev/null" must be given to force
this. This is a bit tedious to type, so this commit makes "/dev/null"
the default.
To achive this, we can simply remove the gengetopt "dependon" statement
from daemon.m4. This works because if no logfile was given, log output
is written to stderr, which is redirected to /dev/null in case -d
was also given. We need to open /dev/null in read-write mode though,
but no other changes are required.
- New autoconf macros to avoid duplication in configure.ac.
- Status items (as shown by para_gui) are updated correctly
when the meta information of the current audio changes.
+ - para_server and para_audiod no longer refuse to start in
+ the background if no log file is given. Instead, all log
+ messages go to /dev/null in this case.
Download: ./releases/paraslash-git.tar.bz2 (tarball)
goto err;
if (chdir("/") < 0)
goto err;
- null = open("/dev/null", O_RDONLY);
+ null = open("/dev/null", O_RDWR);
if (null < 0)
goto err;
if (dup2(null, STDIN_FILENO) < 0)
#~~~~~~~~~~~~~~~~
"run as background daemon"
flag off
-dependon="logfile"
-details="
- Note that </qu>CURRENT_PROGRAM<qu> refuses to start in daemon mode if no
- logfile was specified.
+details = "
+ If this option is given and no logfile was specified, all
+ messages go to /dev/null.
"
</qu>