Do not print daemon's pid after forking if a pidfile is used.
This commit is contained in:
@@ -60,7 +60,8 @@ void daemon_init() {
|
||||
exit(1);
|
||||
} else {
|
||||
// Success !
|
||||
printf("%d\n", pid);
|
||||
if (!config.pidfile)
|
||||
printf("%d\n", pid);
|
||||
exit(0);
|
||||
}
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -88,7 +88,7 @@ void usage(char *progname) {
|
||||
printf(" -b FILL set how full the buffer must be before audio output\n");
|
||||
printf(" starts. This value is in frames; default %d\n", config.buffer_start_fill);
|
||||
printf(" -d, --daemon fork (daemonise). The PID of the child process is\n");
|
||||
printf(" written to stdout\n");
|
||||
printf(" written to stdout, unless a pidfile is used.\n");
|
||||
printf(" -P, --pidfile=FILE write daemon's pid to FILE on startup.\n");
|
||||
printf(" Has no effect if -d is not specified\n");
|
||||
printf(" -l, --log FILE redirect shairport's standard output to FILE\n");
|
||||
|
||||
Reference in New Issue
Block a user