MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / cleanup

Function cleanup

smallthinker/common/console.cpp:121–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119 }
120
121 void cleanup() {
122 // Reset console display
123 set_display(reset);
124
125#if !defined(_WIN32)
126 // Restore settings on POSIX systems
127 if (!simple_io) {
128 if (tty != nullptr) {
129 out = stdout;
130 fclose(tty);
131 tty = nullptr;
132 }
133 tcsetattr(STDIN_FILENO, TCSANOW, &initial_state);
134 }
135#endif
136 }
137
138 //
139 // Display and IO

Callers 6

sigint_handlerFunction · 0.50
sigint_handlerFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50

Calls 1

set_displayFunction · 0.70

Tested by 3

mainFunction · 0.40
mainFunction · 0.40
mainFunction · 0.40