[5.2] bc27a10 Only react on kill(2) if process doesn't exist.
PÃ¥l Hermunn Johansen
hermunn at varnish-software.com
Fri Sep 15 11:17:13 UTC 2017
commit bc27a102fb2b5758a55dd9f6c5ceecfaa0b35e83
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Fri Sep 8 09:54:13 2017 +0000
Only react on kill(2) if process doesn't exist.
diff --git a/lib/libvarnishapi/vsm.c b/lib/libvarnishapi/vsm.c
index 50e1805..ccb0dfb 100644
--- a/lib/libvarnishapi/vsm.c
+++ b/lib/libvarnishapi/vsm.c
@@ -377,7 +377,7 @@ vsm_refresh_set2(struct vsm *vd, struct vsm_set *vs, struct vsb *vsb)
* XXX: be kill(pid,0)'ed for more rapid abandonment detection.
*/
i = sscanf(VSB_data(vsb), "# %ju %ju\n%n", &id1, &id2, &ac);
- if (i != 2 || kill(id1, 0)) {
+ if (i != 2 || (kill(id1, 0) && errno == ESRCH)) {
retval |= VSM_MGT_RESTARTED | VSM_MGT_CHANGED;
return (retval);
}
More information about the varnish-commit
mailing list