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 <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2016-04-11 01:18:57 +02:00
parent efc70e3a75
commit 9b6ef1f053
+1 -2
View File
@@ -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;
}