mountd: Fix type of signal variable

Without this patch got_sighup(), which is the SIGHUP handler,
would set a variable of type int.

This would appear to be incorrect, although it has worked reliably.
This patch changes the type to "_Atomic(int)", which appears
to be all that is needed to correct it.

Reported by:	pen@lysator.lui.se
Reviewed by:	theraven, karels (prev version), kevans (prev version)
Differential Revision:	https://reviews.freebsd.org/D41265
This commit is contained in:
Rick Macklem 2023-08-10 12:50:35 -07:00
parent 9795f14ec4
commit 2409231121

View File

@ -290,7 +290,7 @@ static int resvport_only = 1;
static int nhosts = 0;
static int dir_only = 1;
static int dolog = 0;
static int got_sighup = 0;
static _Atomic(int) got_sighup = 0;
static int xcreated = 0;
static char *svcport_str = NULL;