Commit 84ab3ee3 authored by Anthony DeRossi's avatar Anthony DeRossi Committed by Max Kellermann

unix/PidFile: fix empty PID file

This was broken by 4f29034f.
parent ce0d8964
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "Log.hxx" #include "Log.hxx"
#include <assert.h> #include <assert.h>
#include <string.h>
#include <unistd.h> #include <unistd.h>
#include <stdlib.h> #include <stdlib.h>
#include <fcntl.h> #include <fcntl.h>
...@@ -72,6 +73,8 @@ public: ...@@ -72,6 +73,8 @@ public:
char buffer[64]; char buffer[64];
sprintf(buffer, "%lu\n", (unsigned long)pid); sprintf(buffer, "%lu\n", (unsigned long)pid);
write(fd, buffer, strlen(buffer));
close(fd); close(fd);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment