From 57ed6bb65460216b63238e4b1fe28312a39eb132 Mon Sep 17 00:00:00 2001 From: fatbob313 Date: Thu, 20 Jan 2011 08:24:21 +0000 Subject: [PATCH] Patch from tilman2: Open PID file with O_EXCL --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 70358e6..1b92f50 100644 --- a/src/main.c +++ b/src/main.c @@ -60,7 +60,7 @@ void lockfile(const char *pidfile) int lfp; char str[16]; - lfp = open(pidfile, O_RDWR|O_CREAT, 0640); + lfp = open(pidfile, O_RDWR|O_CREAT|O_EXCL, 0640); if (lfp < 0) Log_fatal("Cannot open PID-file %s for writing", pidfile); -- 2.30.2