24 #ifndef LXCPP_TERMINAL_HPP
25 #define LXCPP_TERMINAL_HPP
52 void tcgetattr(
const int fd,
struct termios *termios_p);
57 void tcsetattr(
const int fd,
const int optional_actions,
const struct termios *termios_p);
74 std::pair<int, std::string>
openPty(
bool rawMode);
80 #endif // LXCPP_TERMINAL_HPP
void setupIOControlTTY(const int ttyFD)
Setups the passed fd as a new control and IO (in, out, err) terminal.
Definition: terminal.cpp:138
void tcgetattr(const int fd, struct termios *termios_p)
Get terminal attributes.
Definition: terminal.cpp:120
void tcsetattr(const int fd, const int optional_actions, const struct termios *termios_p)
Set terminal attributes.
Definition: terminal.cpp:129
int nullStdFDs()
Nullifies all standard file descriptors (stdin, stdout, stderr) replacing them with file descriptor t...
Definition: terminal.cpp:72
std::pair< int, std::string > openPty(bool rawMode)
This function creates a new pair of virtual character devices using a pseudtoreminal interface...
Definition: terminal.cpp:154
bool isatty(int fd)
Checks if a file descriptor is a terminal.
Definition: terminal.cpp:105