From df5b389afd1dae4fc5c590ae79efc7946fc0194e Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Mon, 9 Mar 2026 23:12:02 +0100 Subject: [PATCH] Use more proper flags for the open() for flock() --- cmdline/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmdline/util.c b/cmdline/util.c index 860b3368..7470ece0 100644 --- a/cmdline/util.c +++ b/cmdline/util.c @@ -799,7 +799,7 @@ int lock_lock(const char* file) { int f; - f = open(file, O_CREAT | O_TRUNC | O_WRONLY, 0600); + f = open(file, O_RDONLY | O_CREAT, 0600); if (f == -1) { /* LCOV_EXCL_START */ return -1;