This was broken by 4f29034f.
---
src/unix/PidFile.hxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/unix/PidFile.hxx b/src/unix/PidFile.hxx
index 46b6fbb..0eb3e79 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>
@@ -70,8 +71,10 @@ public:
if (fd < 0)
return;
- char buffer[64];
+ char buffer[64]{};
sprintf(buffer, "%lu\n", (unsigned long)pid);
+
+ write(fd, buffer, strlen(buffer));
close(fd);
}
--
2.4.9
_______________________________________________
mpd-devel mailing list
[email protected]
http://mailman.blarg.de/listinfo/mpd-devel