pidfile: Only update mtime i called multiple times

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2015-12-16 18:40:34 +01:00
parent 12ed342d55
commit 148027674a
+3
View File
@@ -83,6 +83,9 @@ pidfile(const char *basename)
}
(void) fclose(f);
if (pidfile_pid == pid)
return (0);
pidfile_pid = pid;
if (atexit(pidfile_cleanup) < 0) {
save_errno = errno;