wsd/DocumentBroker.hpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
New commits: commit bc65f8220b7c1db3f35015927ef849aa67eba059 Author: Ashod Nakashian <[email protected]> Date: Wed Dec 21 10:09:14 2016 -0500 wsd: don't poll WS for write to check child alive The WS could be chocked on write, but we shouldn't assume the child is dead because of that. We are only trying to test if the child process is alive in that helper. Change-Id: I108a297e43f923cab0dfa30204837dc4df15d3a1 Reviewed-on: https://gerrit.libreoffice.org/32289 Reviewed-by: Ashod Nakashian <[email protected]> Tested-by: Ashod Nakashian <[email protected]> diff --git a/wsd/DocumentBroker.hpp b/wsd/DocumentBroker.hpp index fd3eeff..f2e7604 100644 --- a/wsd/DocumentBroker.hpp +++ b/wsd/DocumentBroker.hpp @@ -140,17 +140,15 @@ public: return false; } - /// Check whether this child is alive and able to respond. + /// Check whether this child is alive and socket not in error. /// Note: zombies will show as alive, and sockets have waiting /// time after the other end-point closes. So this isn't accurate. bool isAlive() const { try { - using namespace Poco::Net; return (_pid > 1 && _ws && kill(_pid, 0) == 0 && - _ws->poll(Poco::Timespan(0), Socket::SelectMode::SELECT_WRITE) && - !_ws->poll(Poco::Timespan(0), Socket::SelectMode::SELECT_ERROR)); + !_ws->poll(Poco::Timespan(0), Poco::Net::Socket::SelectMode::SELECT_ERROR)); } catch (const std::exception& exc) { _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
