6 #include <bitcoin-build-config.h> 84 int fds[2] = {-1, -1};
85 #if HAVE_O_CLOEXEC && HAVE_DECL_PIPE2 86 if (pipe2(fds, O_CLOEXEC) != 0) {
void Close()
Explicit close function.
int TokenWrite(uint8_t token)
Write token to endpoint.
int TokenRead()
Read token from endpoint.
void Close()
Close and end of the pipe that hasn't been moved out.
TokenPipeEnd TakeReadEnd()
Take the read end of this pipe.
static std::optional< TokenPipe > Make()
Create a new pipe.
TokenPipeEnd TakeWriteEnd()
Take the write end of this pipe.
Unexpected end of stream.