unix/PidFile: fix empty PID file

This was broken by 4f29034f.
This commit is contained in:
Anthony DeRossi 2015-09-29 10:39:05 -07:00 committed by Max Kellermann
parent ce0d896492
commit 84ab3ee3af

View File

@ -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);
}