--- clientserver.c.orig 2006-10-12 00:21:11.000000000 +0200 +++ clientserver.c 2006-10-12 00:21:56.000000000 +0200 @@ -854,7 +854,7 @@ int fd; pid_t pid = getpid(); cleanup_set_pid(pid); - if ((fd = do_open(lp_pid_file(), O_WRONLY|O_CREAT|O_TRUNC, + if ((fd = do_open(lp_pid_file(), O_WRONLY|O_CREAT|O_TRUNC|O_EXCL, 0666 & ~orig_umask)) == -1) { cleanup_set_pid(0); rsyserr(FLOG, errno, "failed to create pid file %s",