aboutsummaryrefslogtreecommitdiffstats
path: root/src/unix
diff options
context:
space:
mode:
authorAnthony DeRossi <ajderossi@gmail.com>2015-09-29 10:39:05 -0700
committerMax Kellermann <max@duempel.org>2015-09-30 21:49:18 +0200
commit84ab3ee3af9612249a2aa97c955ce19a14074d4a (patch)
treeeac50664f0301dbd23ea1ca476bf0b2da60e0341 /src/unix
parentce0d896492c5afb4acf545a9cbd6e12f366c1663 (diff)
downloadmpd-84ab3ee3af9612249a2aa97c955ce19a14074d4a.tar.gz
mpd-84ab3ee3af9612249a2aa97c955ce19a14074d4a.tar.xz
mpd-84ab3ee3af9612249a2aa97c955ce19a14074d4a.zip
unix/PidFile: fix empty PID file
This was broken by 4f29034f.
Diffstat (limited to 'src/unix')
-rw-r--r--src/unix/PidFile.hxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/unix/PidFile.hxx b/src/unix/PidFile.hxx
index 46b6fbb54..cbb681554 100644
--- a/src/unix/PidFile.hxx
+++ b/src/unix/PidFile.hxx
@@ -25,6 +25,7 @@
#include "Log.hxx"
#include <assert.h>
+#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>
@@ -72,6 +73,8 @@ public:
char buffer[64];
sprintf(buffer, "%lu\n", (unsigned long)pid);
+
+ write(fd, buffer, strlen(buffer));
close(fd);
}