Fixes to test memcp
[m6w6/libmemcached] / libtest / cmdline.cc
index 1423eca6ceb51f2ff47ba03234563d5db516f379..94c41814a0af35236d8cb6b37f13783427699311 100644 (file)
@@ -59,6 +59,7 @@ using namespace libtest;
 #include <unistd.h>
 
 #include <algorithm>
+#include <stdexcept>
 
 #ifndef __USE_GNU
 static char **environ= NULL;
@@ -408,7 +409,7 @@ bool Application::slurp()
 
 Application::error_t Application::join()
 {
-  pid_t waited_pid= waitpid(_pid, &_status, 0);
+  pid_t waited_pid= waitpid(_pid, &_status, WUNTRACED);
   slurp();
   if (waited_pid == _pid and WIFEXITED(_status) == false)
   {
@@ -481,7 +482,7 @@ Application::error_t Application::join()
   }
   else if (waited_pid == -1)
   {
-    std::string error_string
+    std::string error_string;
     if (stdout_result_length())
     {
       error_string+= " stdout: ";