diff --git a/lib/commonio.c b/lib/commonio.c index 94dda779..16fa7e75 100644 --- a/lib/commonio.c +++ b/lib/commonio.c @@ -141,7 +141,7 @@ static int do_lock_file (const char *file, const char *lock, bool log) int retval; char buf[32]; - fd = open (file, O_CREAT | O_EXCL | O_WRONLY, 0600); + fd = open (file, O_CREAT | O_TRUNC | O_WRONLY, 0600); if (-1 == fd) { if (log) { (void) fprintf (stderr,