Don't use 'FIFO' in function names as we don't use FIFOs any more
No functional changes.
This commit is contained in:
parent
58f78f8734
commit
dc7f561481
3 changed files with 9 additions and 9 deletions
|
@ -214,7 +214,7 @@ void shutdownWebSocket(const std::shared_ptr<Poco::Net::WebSocket>& 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;
|
||||
|
|
|
@ -36,14 +36,14 @@ namespace IoUtil
|
|||
/// Call WebSocket::shutdown() ignoring Poco::IOException.
|
||||
void shutdownWebSocket(const std::shared_ptr<Poco::Net::WebSocket>& 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
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue