loolwsd/LOOLForKit.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit 4655c73539ac5bc4119f9b652efa1708419b3a64 Author: Tor Lillqvist <t...@collabora.com> Date: Wed Oct 12 14:49:01 2016 +0300 Check the capabilities only after opening the fifo loolwsd is waiting in open() for loolkit to open its end of the pipe, so if loolforkit exits before it has opened the pipe, loolwsd will wait forever and not notice that loolkit has exited. Which is not ideal. Note that there are other sanity checks done before loolforkit opens the pipe, and if some of them fail, and loolforkit exits, loolwsd will be hanging in the open and not notice. Need to carefully look through that and re-factor as necessary. Using a named pipe (FIFO) is probably pointless. We should just create a normal pipe in loolwsd and pass the fd of the reading end on the command-line to loolforkit. diff --git a/loolwsd/LOOLForKit.cpp b/loolwsd/LOOLForKit.cpp index 4dc7b3a..fa03aaa 100644 --- a/loolwsd/LOOLForKit.cpp +++ b/loolwsd/LOOLForKit.cpp @@ -280,9 +280,6 @@ int main(int argc, char** argv) Log::initialize("frk", logLevel ? logLevel : "", logColor != nullptr, logToFile, logProperties); - if (!haveCorrectCapabilities()) - return Application::EXIT_SOFTWARE; - Util::setTerminationSignals(); Util::setFatalSignals(); @@ -379,6 +376,9 @@ int main(int argc, char** argv) } Log::debug("open(" + pipeLoolwsd + ", RDONLY) = " + std::to_string(pipeFd)); + if (!haveCorrectCapabilities()) + return Application::EXIT_SOFTWARE; + // Initialize LoKit if (!globalPreinit(loTemplate)) std::_Exit(Application::EXIT_SOFTWARE); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits