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

Function cleanup

common/console.cpp:118–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 8

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

Calls 1

set_displayFunction · 0.70

Tested by 4

mainFunction · 0.40
mainFunction · 0.40
mainFunction · 0.40
mainFunction · 0.40