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;