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)
51
51
52
52
result = cmd_main (argc , argv );
53
53
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 );
57
60
}
Original file line number Diff line number Diff line change @@ -262,8 +262,9 @@ static int print_usage(void)
262
262
* [] the "cmd_name" event has been generated.
263
263
* [] this writes various "def_param" events for interesting config values.
264
264
*
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().
267
268
*/
268
269
int cmd__trace2 (int argc , const char * * argv )
269
270
{
You can’t perform that action at this time.
0 commit comments