[master] 75decc80e vev: use sigaction instead of sighandler
Nils Goroll
nils.goroll at uplex.de
Mon Sep 30 14:28:06 UTC 2024
commit 75decc80e7b97e394d70a74281c7976e64d678dc
Author: Thibaut Artis <thibaut.artis at varnish-software.com>
Date: Fri Apr 12 17:17:40 2024 +0200
vev: use sigaction instead of sighandler
diff --git a/lib/libvarnish/vev.c b/lib/libvarnish/vev.c
index 8ce5837fb..c9335e6a1 100644
--- a/lib/libvarnish/vev.c
+++ b/lib/libvarnish/vev.c
@@ -175,10 +175,11 @@ vev_get_sig(int sig)
/*--------------------------------------------------------------------*/
static void
-vev_sighandler(int sig)
+vev_sigaction(int sig, siginfo_t *siginfo, void *ctx)
{
struct vevsig *es;
+ (void)ctx;
assert(sig < vev_nsig);
assert(vev_sigs != NULL);
es = &vev_sigs[sig];
@@ -278,8 +279,8 @@ VEV_Start(struct vev_root *evb, struct vev *e)
AZ(es->happened);
es->vev = e;
es->vevb = evb;
- es->sigact.sa_flags = e->sig_flags;
- es->sigact.sa_handler = vev_sighandler;
+ es->sigact.sa_flags = e->sig_flags | SA_SIGINFO;
+ es->sigact.sa_sigaction = vev_sigaction;
} else {
es = NULL;
}
More information about the varnish-commit
mailing list