diff --git a/loolwsd/IoUtil.cpp b/loolwsd/IoUtil.cpp index bb861dd2f..1160b157a 100644 --- a/loolwsd/IoUtil.cpp +++ b/loolwsd/IoUtil.cpp @@ -214,7 +214,7 @@ void shutdownWebSocket(const std::shared_ptr& ws) } -ssize_t writeFIFO(int pipe, const char* buffer, ssize_t size) +ssize_t writeToPipe(int pipe, const char* buffer, ssize_t size) { ssize_t count = 0; while(true) @@ -244,7 +244,7 @@ ssize_t writeFIFO(int pipe, const char* buffer, ssize_t size) return count; } -ssize_t readFIFO(int pipe, char* buffer, ssize_t size) +ssize_t readFromPipe(int pipe, char* buffer, ssize_t size) { ssize_t bytes; do @@ -302,8 +302,8 @@ int PipeReader::readLine(std::string& line, else if (pipe.revents & (POLLIN | POLLPRI)) { char buffer[READ_BUFFER_SIZE]; - const auto bytes = readFIFO(_pipe, buffer, sizeof(buffer)); - Log::trace() << "readFIFO for pipe: " << _name << " returned: " << bytes << Log::end; + const auto bytes = readFromPipe(_pipe, buffer, sizeof(buffer)); + Log::trace() << "readFromPipe for pipe: " << _name << " returned: " << bytes << Log::end; if (bytes < 0) { return -1; diff --git a/loolwsd/IoUtil.hpp b/loolwsd/IoUtil.hpp index a2134976c..69819c2ee 100644 --- a/loolwsd/IoUtil.hpp +++ b/loolwsd/IoUtil.hpp @@ -36,14 +36,14 @@ namespace IoUtil /// Call WebSocket::shutdown() ignoring Poco::IOException. void shutdownWebSocket(const std::shared_ptr& ws); - ssize_t writeFIFO(int pipe, const char* buffer, ssize_t size); + ssize_t writeToPipe(int pipe, const char* buffer, ssize_t size); inline - ssize_t writeFIFO(int pipe, const std::string& message) + ssize_t writeToPipe(int pipe, const std::string& message) { - return writeFIFO(pipe, message.c_str(), message.size()); + return writeToPipe(pipe, message.c_str(), message.size()); } - ssize_t readFIFO(int pipe, char* buffer, ssize_t size); + ssize_t readFromPipe(int pipe, char* buffer, ssize_t size); /// Helper class to handle reading from a pipe. class PipeReader diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp index 8b3cec265..8b6e60147 100644 --- a/loolwsd/LOOLWSD.cpp +++ b/loolwsd/LOOLWSD.cpp @@ -228,7 +228,7 @@ static void forkChildren(const int number) Util::checkDiskSpaceOnRegisteredFileSystems(); const std::string aMessage = "spawn " + std::to_string(number) + "\n"; Log::debug("MasterToForKit: " + aMessage.substr(0, aMessage.length() - 1)); - IoUtil::writeFIFO(LOOLWSD::ForKitWritePipe, aMessage); + IoUtil::writeToPipe(LOOLWSD::ForKitWritePipe, aMessage); lastForkRequestTime = std::chrono::steady_clock::now(); } }