Fix signal handling in saccept for windows

Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/24047)
This commit is contained in:
Neil Horman 2024-04-06 15:01:48 -04:00
parent f2f13cff21
commit 7acdd776e3

View File

@ -34,6 +34,9 @@ static void interrupt(int sig)
static void sigsetup(void)
{
#if defined(OPENSSL_SYS_WINDOWS)
signal(SIGINT, interrupt);
#else
struct sigaction sa;
/*
@ -43,6 +46,7 @@ static void sigsetup(void)
sa.sa_handler = interrupt;
sigemptyset(&sa.sa_mask);
sigaction(SIGINT, &sa, NULL);
#endif
}
int main(int argc, char *argv[])