projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
check for waitid and NOWAIT
[m6w6/libmemcached]
/
test
/
lib
/
Cluster.cpp
diff --git
a/test/lib/Cluster.cpp
b/test/lib/Cluster.cpp
index 37ec184e54d5f141ecd0c71b30b99e359d72f20d..de05a79769663e4801866c2c1d4ace41864233b8 100644
(file)
--- a/
test/lib/Cluster.cpp
+++ b/
test/lib/Cluster.cpp
@@
-98,6
+98,7
@@
void Cluster::wait() {
siginfo_t inf;
while (!isStopped()) {
siginfo_t inf;
while (!isStopped()) {
+#if HAVE_WAITID_NOWAIT
if (waitid(P_ALL, 0, &inf, WEXITED | WNOWAIT)) {
perror("Cluster::wait waitid()");
return;
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();
}
if (server != pids.end()) {
server->second->wait();
}
+#else
+ this_thread::sleep_for(100ms);
+#endif
}
}
}
}