]> Kevux Git Server - fll/commitdiff
Update: Print message rather than an error when termination signal is received.
authorKevin Day <kevin@kevux.org>
Sat, 18 Feb 2023 03:02:31 +0000 (21:02 -0600)
committerKevin Day <kevin@kevux.org>
Sat, 18 Feb 2023 03:02:31 +0000 (21:02 -0600)
level_3/fake/c/fake.c

index 093e88b91d2643a09ccdfb01a702a3c8d241b696..f8483813e2fec48b649bbb9b4e839898aab53bb5 100644 (file)
@@ -477,7 +477,15 @@ extern "C" {
         }
 
         if (F_status_is_error(status)) {
-          if (main->error.verbosity != f_console_verbosity_quiet_e) {
+          if (F_status_set_fine(status) == F_interrupt) {
+            flockfile(main->output.to.stream);
+
+            fl_print_format("%rThe operation '%[%r%]", main->output.to.stream, f_string_eol_s, main->output.notable, operations_name, main->output.notable);
+            fl_print_format("' is cancelled.%r", main->output.to.stream, f_string_eol_s);
+
+            funlockfile(main->output.to.stream);
+          }
+          else if (main->error.verbosity != f_console_verbosity_quiet_e) {
             flockfile(main->error.to.stream);
 
             fl_print_format("%r%[%QThe operation '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);