ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
log_io_t Struct Reference

Saved descriptors and temporary file used during stdout/stderr capture. More...

#include <include/ascii-chat/log/io.h>

Data Fields

int saved_stdout_fd
 Saved stdout file descriptor.
int saved_stderr_fd
 Saved stderr file descriptor.
FILE * output
 Temporary capture file, deleted on close.

Detailed Description

Saved descriptors and temporary file used during stdout/stderr capture.

Saved descriptors and temporary file used during stdout/stderr capture

log_io_start() redirects both standard streams and stores their original descriptors here. output receives the captured bytes and is closed by log_io_stop(), which also restores the descriptors.

Definition at line 37 of file io.h.

Field Documentation

◆ output

FILE* log_io_t::output

Temporary capture file, deleted on close.

Definition at line 40 of file io.h.

Referenced by log_io_start(), and log_io_stop().

◆ saved_stderr_fd

int log_io_t::saved_stderr_fd

Saved stderr file descriptor.

Definition at line 39 of file io.h.

Referenced by log_io_start(), and log_io_stop().

◆ saved_stdout_fd

int log_io_t::saved_stdout_fd

Saved stdout file descriptor.

Definition at line 38 of file io.h.

Referenced by log_io_start(), and log_io_stop().


The documentation for this struct was generated from the following file: