serf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1712067 - /serf/trunk/test/test_all.c
Date Mon, 02 Nov 2015 16:24:17 GMT
Author: rhuijben
Date: Mon Nov  2 16:24:17 2015
New Revision: 1712067

URL: http://svn.apache.org/viewvc?rev=1712067&view=rev
Log:
Resolve another testsuite problem identified by running valgrind
over test_all.

* test/test_all.c
  (includes): Add apr_signal.h.
  (main): Prefer an error over a signal if a pipe breaks.

Modified:
    serf/trunk/test/test_all.c

Modified: serf/trunk/test/test_all.c
URL: http://svn.apache.org/viewvc/serf/trunk/test/test_all.c?rev=1712067&r1=1712066&r2=1712067&view=diff
==============================================================================
--- serf/trunk/test/test_all.c (original)
+++ serf/trunk/test/test_all.c Mon Nov  2 16:24:17 2015
@@ -20,6 +20,8 @@
 
 #include "apr.h"
 #include "apr_pools.h"
+#include <apr_signal.h>
+
 #include "test_serf.h"
 #include <stdlib.h>
 
@@ -50,6 +52,11 @@ int main(int argc, char *argv[])
     apr_initialize();
     atexit(apr_terminate);
 
+#ifdef SIGPIPE
+    /* Disable SIGPIPE generation for the platforms that have it. */
+    apr_signal(SIGPIPE, SIG_IGN);
+#endif
+
     for (i = 1; i < argc; i++) {
         if (!strcmp(argv[i], "-v")) {
             continue;



Mime
View raw message