Skip to content

Commit

Permalink
Return from main instead of exiting
Browse files Browse the repository at this point in the history
Right now it doesn't make a difference as the end of main
is currently never reached. However with some additional
tweaks it can be, and that would allow the application
destructor to be called for a nicer cleanup on exit.
  • Loading branch information
gjanssens committed May 29, 2020
1 parent 5cf0c05 commit 09b270c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gnucash/gnucash-cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,5 +174,5 @@ main(int argc, char **argv)
application.parse_command_line (argc, argv);
application.start (argc, argv);

exit(0); /* never reached */
return 0;
}
3 changes: 2 additions & 1 deletion gnucash/gnucash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,5 +465,6 @@ main(int argc, char ** argv)

auto user_file_spec = t_file_spec {application.get_no_file (), application.get_file_to_load ()};
scm_boot_guile (argc, argv, inner_main, &user_file_spec);
exit(0); /* never reached */

return 0;
}

0 comments on commit 09b270c

Please sign in to comment.