MCPcopy Create free account
hub / github.com/FastFlowLM/FastFlowLM / RawTerminalGuard

Method RawTerminalGuard

src/runner/cli_wide_posix.cpp:127–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125class RawTerminalGuard {
126public:
127 RawTerminalGuard() {
128 active = isatty(STDIN_FILENO) && tcgetattr(STDIN_FILENO, &original) == 0;
129 if (!active) {
130 return;
131 }
132
133 termios raw = original;
134 raw.c_lflag &= static_cast<unsigned long>(~(ICANON | ECHO));
135 raw.c_iflag &= static_cast<unsigned long>(~(IXON | ICRNL));
136 raw.c_cc[VMIN] = 1;
137 raw.c_cc[VTIME] = 0;
138 tcsetattr(STDIN_FILENO, TCSANOW, &raw);
139 }
140
141 ~RawTerminalGuard() {
142 if (active) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected