]> Kevux Git Server - fll/commitdiff
Update: Support printing errors for F_signal and F_interrupt statuses.
authorKevin Day <thekevinday@gmail.com>
Sat, 11 Dec 2021 03:39:12 +0000 (21:39 -0600)
committerKevin Day <thekevinday@gmail.com>
Sat, 11 Dec 2021 03:39:12 +0000 (21:39 -0600)
level_2/fll_error/c/private-error.c

index a8fcae68782bbe77c50e1aa8588ed94a5bd4d24f..61c4fde5f962f1e66ec4d1d263865e980aa20777 100644 (file)
@@ -176,6 +176,38 @@ extern "C" {
       return F_false;
     }
 
+    if (status == F_signal) {
+      if (print.verbosity != f_console_verbosity_quiet) {
+        flockfile(print.to.stream);
+
+        fl_print_format("%c%[%SSignal received", print.to.stream, f_string_eol_s[0], print.context, print.prefix);
+
+        private_fll_error_print_function(print, function);
+
+        fl_print_format(".%]%c", print.to.stream, print.context, f_string_eol_s[0]);
+
+        funlockfile(print.to.stream);
+      }
+
+      return F_false;
+    }
+
+    if (status == F_interrupt) {
+      if (print.verbosity != f_console_verbosity_quiet) {
+        flockfile(print.to.stream);
+
+        fl_print_format("%c%[%SInterrupt signal received", print.to.stream, f_string_eol_s[0], print.context, print.prefix);
+
+        private_fll_error_print_function(print, function);
+
+        fl_print_format(".%]%c", print.to.stream, print.context, f_string_eol_s[0]);
+
+        funlockfile(print.to.stream);
+      }
+
+      return F_false;
+    }
+
     if (fallback && print.verbosity != f_console_verbosity_quiet) {
       if (print.verbosity != f_console_verbosity_quiet) {
         flockfile(print.to.stream);