diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/fastd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fastd.c b/src/fastd.c index f479238..eece815 100644 --- a/src/fastd.c +++ b/src/fastd.c @@ -964,7 +964,7 @@ static void write_pid(fastd_context *ctx, pid_t pid) { if (!ctx->conf->pid_file) return; - int fd = open(ctx->conf->pid_file, O_WRONLY|O_CREAT, 0666); + int fd = open(ctx->conf->pid_file, O_WRONLY|O_CREAT|O_TRUNC, 0666); if (fd < 0) { pr_error_errno(ctx, "can't write PID file: open"); return; |