loolwsd/LOOLForKit.cpp |    1 +
 loolwsd/LOOLWSD.cpp    |   10 +++++++---
 loolwsd/PROBLEMS       |    8 --------
 3 files changed, 8 insertions(+), 11 deletions(-)

New commits:
commit 5c6e2095675028816131628b6ffc3d33b5eff5c3
Author: Tor Lillqvist <t...@collabora.com>
Date:   Tue Apr 12 17:49:20 2016 +0300

    Log creation and opening of fifos in more detail

diff --git a/loolwsd/LOOLForKit.cpp b/loolwsd/LOOLForKit.cpp
index dd74a2c..23f43da 100644
--- a/loolwsd/LOOLForKit.cpp
+++ b/loolwsd/LOOLForKit.cpp
@@ -226,6 +226,7 @@ int main(int argc, char** argv)
         Log::syserror("Failed to open pipe [" + pipeLoolwsd + "] for reading. 
Exiting.");
         std::exit(Application::EXIT_SOFTWARE);
     }
+    Log::debug("open(" + pipeLoolwsd + ", RDONLY) = " + 
std::to_string(pipeFd));
 
     // Initialize LoKit
     if (!globalPreinit(loTemplate))
diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index ffbfeb2..4b1a1ed 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -1316,6 +1316,7 @@ int LOOLWSD::main(const std::vector<std::string>& 
/*args*/)
     }
 
     const std::string pipeLoolwsd = Path(pipePath, FIFO_LOOLWSD).toString();
+    Log::debug("mkfifo(" + pipeLoolwsd + ")");
     if (mkfifo(pipeLoolwsd.c_str(), 0666) < 0 && errno != EEXIST)
     {
         Log::syserror("Failed to create pipe FIFO [" + pipeLoolwsd + "].");
@@ -1326,6 +1327,7 @@ int LOOLWSD::main(const std::vector<std::string>& 
/*args*/)
     int pipeFlags = O_RDONLY | O_NONBLOCK;
     int notifyPipe = -1;
     const std::string pipeNotify = Path(pipePath, 
FIFO_ADMIN_NOTIFY).toString();
+    Log::debug("mkfifo(" + pipeNotify + ")");
     if (mkfifo(pipeNotify.c_str(), 0666) < 0 && errno != EEXIST)
     {
         Log::syserror("Failed to create pipe FIFO [" + 
std::string(FIFO_ADMIN_NOTIFY) + "].");
@@ -1334,20 +1336,21 @@ int LOOLWSD::main(const std::vector<std::string>& 
/*args*/)
 
     if ((notifyPipe = open(pipeNotify.c_str(), pipeFlags) ) < 0)
     {
-        Log::syserror("Failed to open pipe for reading.");
+        Log::syserror("Failed to open pipe [" + pipeNotify + "] for reading.");
         std::exit(Application::EXIT_SOFTWARE);
     }
+    Log::debug("open(" + pipeNotify + ", RDONLY) = " + 
std::to_string(notifyPipe));
 
     if ((pipeFlags = fcntl(notifyPipe, F_GETFL, 0)) < 0)
     {
-        Log::syserror("Failed to get pipe flags [" + 
std::string(FIFO_ADMIN_NOTIFY) + "].");
+        Log::syserror("Failed to get pipe flags [" + pipeNotify + "].");
         std::exit(Application::EXIT_SOFTWARE);
     }
 
     pipeFlags &= ~O_NONBLOCK;
     if (fcntl(notifyPipe, F_SETFL, pipeFlags) < 0)
     {
-        Log::syserror("Failed to set pipe flags [" + 
std::string(FIFO_ADMIN_NOTIFY) + "].");
+        Log::syserror("Failed to set pipe flags [" + pipeNotify + "].");
         std::exit(Application::EXIT_SOFTWARE);
     }
 
@@ -1400,6 +1403,7 @@ int LOOLWSD::main(const std::vector<std::string>& 
/*args*/)
         Log::syserror("Failed to open pipe [" + pipeLoolwsd + "] for 
writing.");
         return Application::EXIT_SOFTWARE;
     }
+    Log::debug("open(" + pipeLoolwsd + ", WRONLY) = " + 
std::to_string(ForKitWritePipe));
 
     threadPool.start(Admin::instance());
 
commit 6342c33dda0d6a609307a6d4b519e5284fc1a8fb
Author: Tor Lillqvist <t...@collabora.com>
Date:   Tue Apr 12 16:04:59 2016 +0300

    ClientPortNumber is not static any longer

diff --git a/loolwsd/PROBLEMS b/loolwsd/PROBLEMS
index edc151a..89ed2c7 100644
--- a/loolwsd/PROBLEMS
+++ b/loolwsd/PROBLEMS
@@ -1,14 +1,6 @@
 - There is way too much of busy waiting for fairly arbitrarily chosen
   timeout periods in the code.
 
-- The --clientport= option to a lookit process (when spawning them,
-  not forking) can not work as intended. The ClientPortNumber variable
-  is declared *static* in ChildProcessSession.hpp and thus is a
-  separate variable in each compilation unit (object file) that
-  includes ChildProcessSession.hpp. The variable that is assigned in
-  main() in LOOLBroker.cpp is not the variable used in
-  ChildProcessSession::downloadAs() in ChildProcessSession.cpp.
-
 - Recursive mutexes are evil. In general, I think the consensus is
   that recursive mutexes should be avoided. One should use them only
   when absolutely necessary because the code-base is so complex that
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to