aboutgitcodebugslistschat
path: root/passt.c
diff options
context:
space:
mode:
Diffstat (limited to 'passt.c')
-rw-r--r--passt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/passt.c b/passt.c
index a8d94b4..01eed1b 100644
--- a/passt.c
+++ b/passt.c
@@ -390,7 +390,7 @@ int main(int argc, char **argv)
if (*c.pid_file) {
if ((pidfile_fd = open(c.pid_file,
- O_CREAT | O_WRONLY | O_CLOEXEC,
+ O_CREAT | O_TRUNC | O_WRONLY | O_CLOEXEC,
S_IRUSR | S_IWUSR)) < 0) {
perror("PID file open");
exit(EXIT_FAILURE);