diff --git a/main.c b/main.c index e109b41..adb3827 100644 --- a/main.c +++ b/main.c @@ -860,10 +860,12 @@ void do_halt (int error) { close (sfd); } - if(exit_code) + if (exit_code) { retval = exit_code; - else + } else { retval = error ? EXIT_FAILURE : EXIT_SUCCESS; + } + exit (retval); }