Răsfoiți Sursa

Reset color before we exit (#11205)

We don't want colors to leak post termination of llama-run.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
Eric Curtin 1 an în urmă
părinte
comite
924518e2e5
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      examples/run/run.cpp

+ 1 - 1
examples/run/run.cpp

@@ -29,7 +29,7 @@
 
 
 #if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) || defined(_WIN32)
 #if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) || defined(_WIN32)
 [[noreturn]] static void sigint_handler(int) {
 [[noreturn]] static void sigint_handler(int) {
-    printf("\n");
+    printf("\n\033[0m");
     exit(0);  // not ideal, but it's the only way to guarantee exit in all cases
     exit(0);  // not ideal, but it's the only way to guarantee exit in all cases
 }
 }
 #endif
 #endif