1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
Description: assorted fixes
[Maarten L. Hekkelman <m.hekkelman@cmbi.ru.nl>]
* Fixed compilation failure by only adding the WCONTINUED
flag if it is defined.
.
Upstream is aware of this patch.
Author: Maarten L. Hekkelman <m.hekkelman@cmbi.ru.nl>
--- a/src/preforked-http-server.cpp
+++ b/src/preforked-http-server.cpp
@@ -42,8 +42,11 @@
{
kill(m_pid, SIGKILL);
- int status;
- waitpid(m_pid, &status, WUNTRACED | WCONTINUED);
+ int status, flags = WUNTRACED;
+#ifdef WCONTINUED
+ flags |= WCONTINUED;
+#endif
+ waitpid(m_pid, &status, flags);
}
m_io_service.stop();
@@ -149,7 +152,11 @@
while (count-- > 0)
{
- if (waitpid(m_pid, &status, WUNTRACED | WCONTINUED | WNOHANG) == -1)
+ int flags = WUNTRACED | WNOHANG;
+#ifdef WCONTINUED
+ flags |= WCONTINUED;
+#endif
+ if (waitpid(m_pid, &status, flags) == -1)
break;
if (WIFEXITED(status))
|