From 554c903208ceab0b6e0624d132f92a108aaae033 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Fri, 17 Feb 2023 21:02:31 -0600 Subject: [PATCH] Update: Print message rather than an error when termination signal is received. --- level_3/fake/c/fake.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/level_3/fake/c/fake.c b/level_3/fake/c/fake.c index 093e88b..f848381 100644 --- a/level_3/fake/c/fake.c +++ b/level_3/fake/c/fake.c @@ -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); -- 1.8.3.1