*
*/
-#include <config.h>
-#include <libtest/common.h>
+#include "mem_config.h"
+#include "libtest/common.h"
using namespace libtest;
#include <fcntl.h>
#include <fstream>
#include <memory>
-#include <poll.h>
-#include <spawn.h>
+#ifdef HAVE_POLL_H
+# include <poll.h>
+#endif
+#ifdef HAVE_SPAWN_H
+# include <spawn.h>
+#endif
#include <sstream>
#include <string>
#include <sys/stat.h>
}
else if WIFSIGNALED(_status)
{
- // memcached will die with SIGHUP
if (WTERMSIG(_status) != SIGTERM and WTERMSIG(_status) != SIGHUP)
{
_app_exit_state= Application::INVALID_POSIX_SPAWN;
throw std::runtime_error(error_string);
}
- _app_exit_state= Application::SIGTERM_KILLED;
- Error << "waitpid() application terminated at request"
+ // If we terminted it on purpose then it counts as a success.
+ Out << "waitpid() application terminated at request"
<< " pid:" << _pid
<< " name:" << built_argv[0];
}