From cbce98cc38b6e22e60d5664ccc4905e47eb68719 Mon Sep 17 00:00:00 2001 From: Tristan Riehs Date: Sun, 22 Oct 2023 00:09:55 +0200 Subject: error handling edited --- rpt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rpt.c b/rpt.c index 6650f1e..d2e4719 100644 --- a/rpt.c +++ b/rpt.c @@ -48,10 +48,11 @@ print_version() void exit_on_error(int status) { - if (WIFEXITED(status)) + if (!status) return; - fprintf(stderr, "Process exited with status %d, aborting.\n", status); + fprintf(stderr, "Child process exited with status %d, aborting.\n", + status); exit(1); } -- cgit v1.2.3