diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2018-06-27 21:31:43 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2018-07-02 08:39:51 +0000 |
commit | eedcfa03415b29cdc6e9cd0be6c9f778c868e4d6 (patch) | |
tree | 91a94707943f2e8c18f6b5cf0bb7759694fd1c14 /tests/tls13/psk-dumbfw.c | |
parent | ee16068f67d4d69f139cfdd2675c79dacb15dfcf (diff) | |
download | gnutls-eedcfa03415b29cdc6e9cd0be6c9f778c868e4d6.tar.gz |
tests: ignore PIPE signal on TLS1.3-related tests
This was inadvertently omitted and that could cause unexpected
issues when one of the peers would close the connection earlier
than expected.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Diffstat (limited to 'tests/tls13/psk-dumbfw.c')
-rw-r--r-- | tests/tls13/psk-dumbfw.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/tls13/psk-dumbfw.c b/tests/tls13/psk-dumbfw.c index c9c995801e..5d8ad8b152 100644 --- a/tests/tls13/psk-dumbfw.c +++ b/tests/tls13/psk-dumbfw.c @@ -48,6 +48,7 @@ int main(int argc, char **argv) #include <unistd.h> #include <gnutls/gnutls.h> #include <assert.h> +#include <signal.h> #include "tls13/ext-parse.h" @@ -279,6 +280,15 @@ static void server(int sd, const char *prio) success("server: finished\n"); } +static void ch_handler(int sig) +{ + int status = 0; + wait(&status); + check_wait_status(status); + return; +} + + static void run_test(const char *prio) { @@ -286,6 +296,9 @@ void run_test(const char *prio) int err; int sockets[2]; + signal(SIGCHLD, ch_handler); + signal(SIGPIPE, SIG_IGN); + success("trying with %s\n", prio); err = socketpair(AF_UNIX, SOCK_STREAM, 0, sockets); @@ -303,7 +316,7 @@ void run_test(const char *prio) } if (child) { - int status; + int status = 0; /* parent */ close(sockets[1]); server(sockets[0], prio); |