diff options
author | Anthony DeRossi <ajderossi@gmail.com> | 2015-09-29 10:39:05 -0700 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-09-30 21:49:18 +0200 |
commit | 84ab3ee3af9612249a2aa97c955ce19a14074d4a (patch) | |
tree | eac50664f0301dbd23ea1ca476bf0b2da60e0341 /src/unix/PidFile.hxx | |
parent | ce0d896492c5afb4acf545a9cbd6e12f366c1663 (diff) | |
download | mpd-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/PidFile.hxx')
-rw-r--r-- | src/unix/PidFile.hxx | 3 |
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); } |