aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2017-04-10 23:43:59 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2017-04-10 23:43:59 +0300
commit443d072f392ba3bed8f1e86f545e118f473d9679 (patch)
tree5b05031bb7fe1e663674c92bf7fd1490e08c5329
parentb70a0b2b66864649149c462ab2a3272b44cd8c18 (diff)
downloadlibmicrohttpd-443d072f392ba3bed8f1e86f545e118f473d9679.tar.gz
libmicrohttpd-443d072f392ba3bed8f1e86f545e118f473d9679.zip
test_get_response_cleanup: ignore SIGPIPE on Solaris
-rw-r--r--src/testcurl/test_get_response_cleanup.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/testcurl/test_get_response_cleanup.c b/src/testcurl/test_get_response_cleanup.c
index 2833899c..76657262 100644
--- a/src/testcurl/test_get_response_cleanup.c
+++ b/src/testcurl/test_get_response_cleanup.c
@@ -35,6 +35,9 @@
35#include <sys/types.h> 35#include <sys/types.h>
36#include <sys/wait.h> 36#include <sys/wait.h>
37#include <fcntl.h> 37#include <fcntl.h>
38#ifdef __sun
39#include <signal.h>
40#endif /* __sun */
38 41
39#ifndef WINDOWS 42#ifndef WINDOWS
40#include <sys/socket.h> 43#include <sys/socket.h>
@@ -303,6 +306,13 @@ int
303main (int argc, char *const *argv) 306main (int argc, char *const *argv)
304{ 307{
305 unsigned int errorCount = 0; 308 unsigned int errorCount = 0;
309#ifdef __sun
310 struct sigaction act;
311
312 /* Solaris has no way to disable SIGPIPE on socket disconnect. */
313 act.sa_handler = SIG_IGN;
314 sigaction(SIGPIPE, &act, NULL);
315#endif /* __sun */
306 316
307 oneone = (NULL != strrchr (argv[0], (int) '/')) ? 317 oneone = (NULL != strrchr (argv[0], (int) '/')) ?
308 (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0; 318 (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;