gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r17020 - libmicrohttpd/src/testcurl


From: gnunet
Subject: [GNUnet-SVN] r17020 - libmicrohttpd/src/testcurl
Date: Mon, 26 Sep 2011 21:16:59 +0200

Author: grothoff
Date: 2011-09-26 21:16:59 +0200 (Mon, 26 Sep 2011)
New Revision: 17020

Modified:
   libmicrohttpd/src/testcurl/daemontest_get_response_cleanup.c
Log:
report failure to exec curl

Modified: libmicrohttpd/src/testcurl/daemontest_get_response_cleanup.c
===================================================================
--- libmicrohttpd/src/testcurl/daemontest_get_response_cleanup.c        
2011-09-26 16:58:08 UTC (rev 17019)
+++ libmicrohttpd/src/testcurl/daemontest_get_response_cleanup.c        
2011-09-26 19:16:59 UTC (rev 17020)
@@ -57,6 +57,9 @@
   if (ret != 0)
     return ret;
   execlp ("curl", "curl", "-s", "-N", "-o", "/dev/null", "-GET", url, NULL);
+  fprintf (stderr, 
+          "Failed to exec curl: %s\n",
+          strerror (errno));
   _exit (-1);  
 }
 
@@ -65,7 +68,7 @@
 {
   int status;
 
-  // fprintf (stderr, "Killing curl\n");
+  //fprintf (stderr, "Killing curl\n");
   kill (pid, SIGTERM);
   waitpid (pid, &status, 0);
 }
@@ -85,7 +88,7 @@
 {
   int *ok = cls;
 
-  // fprintf (stderr, "Cleanup callback called!\n");
+  //fprintf (stderr, "Cleanup callback called!\n");
   *ok = 0;
 }
 
@@ -104,6 +107,7 @@
   struct MHD_Response *response;
   int ret;
 
+  //fprintf (stderr, "In CB: %s!\n", method);
   if (0 != strcmp (me, method))
     return MHD_NO;              /* unexpected method */
   if (&ptr != *unused)
@@ -160,6 +164,7 @@
   if (d == NULL)
     return 16;
   ok = 1;
+  //fprintf (stderr, "Forking cURL!\n");
   curl = fork_curl ("http://localhost:1081/";);
   sleep (1);
   kill_curl (curl);
@@ -174,7 +179,7 @@
     }
   kill_curl (curl);
   sleep (1);
-  // fprintf (stderr, "Stopping daemon!\n");
+  //fprintf (stderr, "Stopping daemon!\n");
   MHD_stop_daemon (d);
   if (ok != 0)
     return 32;
@@ -198,7 +203,7 @@
   sleep (1);
   kill_curl (curl);
   sleep (1);
-  // fprintf (stderr, "Stopping daemon!\n");
+  //fprintf (stderr, "Stopping daemon!\n");
   MHD_stop_daemon (d);
   if (ok != 0)
     return 128;




reply via email to

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