gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [libmicrohttpd] 02/02: test_get_response_cleanup: ignore SI


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] 02/02: test_get_response_cleanup: ignore SIGPIPE on Solaris
Date: Mon, 10 Apr 2017 22:44:21 +0200

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 443d072f392ba3bed8f1e86f545e118f473d9679
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Mon Apr 10 23:43:59 2017 +0300

    test_get_response_cleanup: ignore SIGPIPE on Solaris
---
 src/testcurl/test_get_response_cleanup.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

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 @@
 #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;

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]