commit 443d072f392ba3bed8f1e86f545e118f473d9679
parent b70a0b2b66864649149c462ab2a3272b44cd8c18
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Mon, 10 Apr 2017 23:43:59 +0300
test_get_response_cleanup: ignore SIGPIPE on Solaris
Diffstat:
1 file changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/testcurl/test_get_response_cleanup.c b/src/testcurl/test_get_response_cleanup.c
@@ -35,6 +35,9 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <fcntl.h>
+#ifdef __sun
+#include <signal.h>
+#endif /* __sun */
#ifndef WINDOWS
#include <sys/socket.h>
@@ -303,6 +306,13 @@ int
main (int argc, char *const *argv)
{
unsigned int errorCount = 0;
+#ifdef __sun
+ struct sigaction act;
+
+ /* Solaris has no way to disable SIGPIPE on socket disconnect. */
+ act.sa_handler = SIG_IGN;
+ sigaction(SIGPIPE, &act, NULL);
+#endif /* __sun */
oneone = (NULL != strrchr (argv[0], (int) '/')) ?
(NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;