From 9b6ef1f053caee662a7baad6f3c2873397d9d622 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Mon, 11 Apr 2016 01:18:57 +0200 Subject: [PATCH] pidfile(): Activate use of utimensat() to update atime+mtime Due to problems with the unit tests the use of utimensat() in pidfile() was disabled, and forgotten. This patch enables it, but beware, this thing is QUICK on any system with a L2 cache or better. Signed-off-by: Joachim Nilsson --- pidfile.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pidfile.c b/pidfile.c index 6fa8112..6420eeb 100644 --- a/pidfile.c +++ b/pidfile.c @@ -63,8 +63,7 @@ pidfile(const char *basename) atexit_already = 0; if (pidfile_path != NULL) { - if (0) { //pid == pidfile_pid) { - printf("Updating mtime ...\n"); + if (pid == pidfile_pid) { utimensat(0, pidfile_path, NULL, 0); return 0; }