QElectroTech 0.200.1-dev
Loading...
Searching...
No Matches
logring.cpp File Reference
#include "logring.h"
#include <cstring>
#include <cerrno>
#include <unistd.h>
Include dependency graph for logring.cpp:

Namespaces

namespace  anonymous_namespace{logring.cpp}

Functions

void anonymous_namespace{logring.cpp}::writeAllSignalSafe (int fd, const char *data, int length) noexcept
 writeAllSignalSafe Loops until length bytes have been written to fd or an unrecoverable error occurs. write(2) may write fewer bytes than requested and may return EINTR – both are more likely from inside a signal handler than in normal code, so a single write() call is not enough here. Async-signal-safe: only calls write(2)/errno, nothing else.