From 148027674a7a751f6d60b8bf6034e50a764a95c4 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Wed, 16 Dec 2015 18:40:34 +0100 Subject: [PATCH] pidfile: Only update mtime i called multiple times Signed-off-by: Joachim Nilsson --- pidfile.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pidfile.c b/pidfile.c index 89e24d3..bde9b34 100644 --- a/pidfile.c +++ b/pidfile.c @@ -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;