is used after pid has changed.
ok deraadt@
-/* $OpenBSD: asr.c,v 1.37 2015/05/29 08:49:37 eric Exp $ */
+/* $OpenBSD: asr.c,v 1.38 2015/06/04 19:23:17 eric Exp $ */
/*
* Copyright (c) 2010-2012 Eric Faurot <eric@openbsd.org>
*
#if ASR_OPT_RELOADCONF
struct stat st;
struct timespec ts;
+ pid_t pid;
#endif
if (asr->a_path == NULL)
return;
#if ASR_OPT_RELOADCONF
+
+ pid = getpid();
+ if (pid != asr->a_pid) {
+ asr->a_pid = pid;
+ asr->a_rtime = 0;
+ }
+
if (clock_gettime(CLOCK_MONOTONIC, &ts) == -1)
return;
-/* $OpenBSD: asr_private.h,v 1.29 2015/05/29 08:49:37 eric Exp $ */
+/* $OpenBSD: asr_private.h,v 1.30 2015/06/04 19:23:17 eric Exp $ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
*
struct asr {
char *a_path;
+ pid_t a_pid;
time_t a_mtime;
time_t a_rtime;
struct asr_ctx *a_ctx;