[Libreoffice-commits] online.git: loolwsd/Common.hpp loolwsd/LOOLWSD.cpp

Tor Lillqvist tml at collabora.com
Tue Apr 12 15:08:21 UTC 2016


 loolwsd/Common.hpp  |    1 -
 loolwsd/LOOLWSD.cpp |   31 -------------------------------
 2 files changed, 32 deletions(-)

New commits:
commit 241d421fc7e4ae44b11446ecf997d5c578deac19
Author: Tor Lillqvist <tml at collabora.com>
Date:   Tue Apr 12 18:03:57 2016 +0300

    Kill the  "lool_admin_notify.fifo" thing as it is not used
    
    The loolwsd process created it and opened it for reading, but nothing
    opened it for writing.
    
    There is still documentation for it in README, that needs to be either
    rewritten to match reality or removed.

diff --git a/loolwsd/Common.hpp b/loolwsd/Common.hpp
index 16b3594..cc9b4d1 100644
--- a/loolwsd/Common.hpp
+++ b/loolwsd/Common.hpp
@@ -34,7 +34,6 @@ constexpr int READ_BUFFER_SIZE = 2048;
 constexpr int SMALL_MESSAGE_SIZE = READ_BUFFER_SIZE / 2;
 
 constexpr auto CHILD_URI = "/loolws/child?";
-constexpr auto FIFO_ADMIN_NOTIFY = "lool_admin_notify.fifo";
 constexpr auto FIFO_LOOLWSD = "loolwsdfifo";
 constexpr auto FIFO_PATH = "pipe";
 constexpr auto JAILED_DOCUMENT_ROOT = "/user/docs/";
diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index e46fa02..8e30bdf 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -1323,37 +1323,6 @@ int LOOLWSD::main(const std::vector<std::string>& /*args*/)
         return Application::EXIT_SOFTWARE;
     }
 
-    // Open notify pipe
-    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 fifo [" + pipeNotify + "].");
-        std::exit(Application::EXIT_SOFTWARE);
-    }
-
-    if ((notifyPipe = open(pipeNotify.c_str(), pipeFlags) ) < 0)
-    {
-        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 [" + pipeNotify + "].");
-        std::exit(Application::EXIT_SOFTWARE);
-    }
-
-    pipeFlags &= ~O_NONBLOCK;
-    if (fcntl(notifyPipe, F_SETFL, pipeFlags) < 0)
-    {
-        Log::syserror("Failed to set pipe flags [" + pipeNotify + "].");
-        std::exit(Application::EXIT_SOFTWARE);
-    }
-
     const Process::PID forKitPid = createForKit();
     if (forKitPid < 0)
     {


More information about the Libreoffice-commits mailing list