Skip to content

Commit 77117c7

Browse files
committed
(per ggml-org#283) try to force flush of color reset in SIGINT handler
1 parent 9a1d2c7 commit 77117c7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,7 @@ static bool is_interacting = false;
748748
#if defined (__unix__) || (defined (__APPLE__) && defined (__MACH__)) || defined (_WIN32)
749749
void sigint_handler(int signo) {
750750
printf(ANSI_COLOR_RESET);
751+
printf("\n"); // this also force flush stdout.
751752
if (signo == SIGINT) {
752753
if (!is_interacting) {
753754
is_interacting=true;

0 commit comments

Comments
 (0)