[master] 7a1d8def8 fix signal handling in VUT

Nils Goroll nils.goroll at uplex.de
Thu Oct 15 09:27:06 UTC 2020


commit 7a1d8def8a8dac1f8ffec995110ec28d1c60ecef
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Wed Oct 14 16:26:34 2020 +0200

    fix signal handling in VUT
    
    55995ab0f96c458b1b585afe49c3af737e363205 turned the VSIG_* flags into
    counters, and changed the top of the VUT_Main() accordingly.
    
    We need to reflect the change also further down in the tight loop
    calling VSLQ_Dispatch().
    
    Fixes #3436

diff --git a/lib/libvarnishapi/vut.c b/lib/libvarnishapi/vut.c
index 6e8384572..24407dc80 100644
--- a/lib/libvarnishapi/vut.c
+++ b/lib/libvarnishapi/vut.c
@@ -454,7 +454,9 @@ VUT_Main(struct VUT *vut)
 
 		do
 			i = VSLQ_Dispatch(vut->vslq, vut_dispatch, vut);
-		while (i == vsl_more && !VSIG_hup && !VSIG_usr1);
+		while (i == vsl_more &&
+		       VSIG_usr1 == vut->last_sigusr1 &&
+		       VSIG_hup == vut->last_sighup);
 
 		if (i == vsl_more)
 			continue;


More information about the varnish-commit mailing list