From e285d2939b301bdcfa3cece5e47df9039f0b692d Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Fri, 19 Apr 2013 10:21:46 -0700 Subject: [PATCH] Teach fish to exit without destructors in the normal path --- fish.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fish.cpp b/fish.cpp index 36dbdb75c..b46ce990e 100644 --- a/fish.cpp +++ b/fish.cpp @@ -554,5 +554,6 @@ int main(int argc, char **argv) if (g_log_forks) printf("%d: g_fork_count: %d\n", __LINE__, g_fork_count); - return res?STATUS_UNKNOWN_COMMAND:proc_get_last_status(); + exit_without_destructors(res ? STATUS_UNKNOWN_COMMAND : proc_get_last_status()); + return EXIT_FAILURE; //above line should always exit }