File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,10 @@ int main(int argc, const char **argv)
5151
5252 result = cmd_main (argc , argv );
5353
54- trace2_cmd_exit (result );
55-
56- return result ;
54+ /*
55+ * We define exit() to call trace2_cmd_exit_fl() in
56+ * git-compat-util.h. Whether we reach this or exit()
57+ * elsewhere we'll always run our trace2 exit handler.
58+ */
59+ exit (result );
5760}
Original file line number Diff line number Diff line change @@ -262,8 +262,9 @@ static int print_usage(void)
262262 * [] the "cmd_name" event has been generated.
263263 * [] this writes various "def_param" events for interesting config values.
264264 *
265- * We further assume that if we return (rather than exit()), trace2_cmd_exit()
266- * will be called by test-tool.c:cmd_main().
265+ * We return from here and let test-tool.c::cmd_main() pass the exit
266+ * code to common-main.c::main(), which will use it to call
267+ * trace2_cmd_exit().
267268 */
268269int cmd__trace2 (int argc , const char * * argv )
269270{
You can’t perform that action at this time.
0 commit comments