[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] 03/04: Use MHD_FEATURE_AUTOSUPPRESS_SIGPIPE
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] 03/04: Use MHD_FEATURE_AUTOSUPPRESS_SIGPIPE in testsuite |
Date: |
Thu, 13 Jul 2017 20:45:11 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 5f2517a9ea9f0be061bc13d1fe069728a0cf83ee
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Thu Jul 13 19:35:28 2017 +0300
Use MHD_FEATURE_AUTOSUPPRESS_SIGPIPE in testsuite
---
src/testcurl/test_get_response_cleanup.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/src/testcurl/test_get_response_cleanup.c
b/src/testcurl/test_get_response_cleanup.c
index 03552ba0..aeb982e9 100644
--- a/src/testcurl/test_get_response_cleanup.c
+++ b/src/testcurl/test_get_response_cleanup.c
@@ -35,9 +35,9 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <fcntl.h>
-#ifdef __sun
+#ifndef _WIN32
#include <signal.h>
-#endif /* __sun */
+#endif /* _WIN32 */
#ifndef WINDOWS
#include <sys/socket.h>
@@ -386,13 +386,16 @@ int
main (int argc, char *const *argv)
{
unsigned int errorCount = 0;
-#ifdef __sun
- struct sigaction act;
-
+#ifndef _WIN32
/* Solaris has no way to disable SIGPIPE on socket disconnect. */
- act.sa_handler = SIG_IGN;
- sigaction(SIGPIPE, &act, NULL);
-#endif /* __sun */
+ if (MHD_NO == MHD_is_feature_supported (MHD_FEATURE_AUTOSUPPRESS_SIGPIPE))
+ {
+ struct sigaction act;
+
+ act.sa_handler = SIG_IGN;
+ sigaction(SIGPIPE, &act, NULL);
+ }
+#endif /* _WIN32 */
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