diff --git a/daemon.c b/daemon.c index b56ed67d..46cd4adb 100644 --- a/daemon.c +++ b/daemon.c @@ -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 { diff --git a/shairport.c b/shairport.c index ffcee0be..a9c52066 100644 --- a/shairport.c +++ b/shairport.c @@ -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");