search for: have_sigpipe

Displaying 1 result from an estimated 1 matches for "have_sigpipe".

2023 Aug 31
0
[RFC PATCH v2 2/2] test/vsock: shutdowned socket test
....h> >+#include <signal.h> > > #include "timeout.h" > #include "control.h" >@@ -1170,6 +1171,133 @@ static void test_seqpacket_msg_peek_server(const struct test_opts *opts) > return test_msg_peek_server(opts, true); > } > >+static sig_atomic_t have_sigpipe; >+ >+static void sigpipe(int signo) >+{ >+ have_sigpipe = 1; >+} >+ >+static void test_stream_check_sigpipe(int fd) >+{ >+ ssize_t res; >+ >+ have_sigpipe = 0; >+ >+ res = send(fd, "A", 1, 0); >+ if (res != -1) { >+ fprintf(stderr, "expe...