check_decl(pipe2 unistd.h)
check_decl(SOCK_NONBLOCK sys/socket.h)
check_decl(SOCK_CLOEXEC sys/socket.h)
+check_decl(waitid sys/wait.h)
+if(HAVE_WAITID)
+ check_compiles(HAVE_WAITID_NOWAIT "siginfo_t s; waitid(P_ALL, 0, &s, WNOWAIT|WEXITED);" sys/types.h sys/wait.h)
+endif()
file(GLOB_RECURSE TESTING_SRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp)
set(TESTING_ROOT ${CMAKE_CURRENT_BINARY_DIR})
#cmakedefine HAVE_SOCK_CLOEXEC 1
#cmakedefine HAVE_EXECUTION 1
#cmakedefine HAVE_TBB 1
+#cmakedefine HAVE_WAITID_NOWAIT 1
#cmakedefine TESTING_ROOT "@TESTING_ROOT@"
#cmakedefine MEMCACHED_BINARY getenv_else("MEMCACHED_BINARY", "@MEMCACHED_BINARY@")
siginfo_t inf;
while (!isStopped()) {
+#if HAVE_WAITID_NOWAIT
if (waitid(P_ALL, 0, &inf, WEXITED | WNOWAIT)) {
perror("Cluster::wait waitid()");
return;
if (server != pids.end()) {
server->second->wait();
}
+#else
+ this_thread::sleep_for(100ms);
+#endif
}
}