diff options
author | Neil Horman <nhorman@openssl.org> | 2024-04-06 21:01:48 +0200 |
---|---|---|
committer | Neil Horman <nhorman@openssl.org> | 2024-04-12 14:02:19 +0200 |
commit | 7acdd776e322814238c2c58296ecfcf0d16d5cf7 (patch) | |
tree | 7849b50075384d210f753df8391bbe1d9c7866c1 | |
parent | Fix warnings found by clang in CI (diff) | |
download | openssl-7acdd776e322814238c2c58296ecfcf0d16d5cf7.tar.xz openssl-7acdd776e322814238c2c58296ecfcf0d16d5cf7.zip |
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)
-rw-r--r-- | demos/bio/saccept.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/demos/bio/saccept.c b/demos/bio/saccept.c index d44c6242a2..7936c23fbc 100644 --- a/demos/bio/saccept.c +++ b/demos/bio/saccept.c @@ -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[]) |