From: fatbob313 Date: Thu, 20 Jan 2011 08:24:21 +0000 (+0000) Subject: Patch from tilman2: Open PID file with O_EXCL X-Git-Url: http://git.code-monkey.de/?a=commitdiff_plain;h=57ed6bb65460216b63238e4b1fe28312a39eb132;p=umurmur.git Patch from tilman2: Open PID file with O_EXCL --- 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);