X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=test%2Flib%2FCluster.cpp;h=de05a79769663e4801866c2c1d4ace41864233b8;hb=25c4609a8973f6d14bcba4546ecb8137a29be823;hp=37ec184e54d5f141ecd0c71b30b99e359d72f20d;hpb=58868f7d354b47b7cd5b609e8a2287efd4422407;p=m6w6%2Flibmemcached diff --git a/test/lib/Cluster.cpp b/test/lib/Cluster.cpp index 37ec184e..de05a797 100644 --- a/test/lib/Cluster.cpp +++ b/test/lib/Cluster.cpp @@ -98,6 +98,7 @@ void Cluster::wait() { siginfo_t inf; while (!isStopped()) { +#if HAVE_WAITID_NOWAIT if (waitid(P_ALL, 0, &inf, WEXITED | WNOWAIT)) { perror("Cluster::wait waitid()"); return; @@ -107,6 +108,9 @@ void Cluster::wait() { if (server != pids.end()) { server->second->wait(); } +#else + this_thread::sleep_for(100ms); +#endif } }