Skip to content

Commit

Permalink
Merge branch 'hotfix/retcode'
Browse files Browse the repository at this point in the history
  • Loading branch information
hmgle committed Dec 10, 2021
2 parents 52ab8c1 + 1e1a6e5 commit 49d492e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion graftcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ int LOCAL_PIPE_FD;
struct str_set *BLACKLIST_IP = NULL;
struct str_set *WHITELACKLIST_IP = NULL;

static int exit_code = 0;

static void load_ip_file(char *path, struct str_set **set)
{
FILE *f;
Expand Down Expand Up @@ -323,6 +325,7 @@ int do_trace()
}
if (WIFSIGNALED(status) || WIFEXITED(status)
|| !WIFSTOPPED(status)) {
exit_code = WEXITSTATUS(status);
/* TODO free pinfp */
continue;
}
Expand Down Expand Up @@ -493,5 +496,7 @@ int client_main(int argc, char **argv)
}

init(argc - optind, argv + optind);
return do_trace();
if (do_trace() < 0)
return -1;
return exit_code;
}

0 comments on commit 49d492e

Please sign in to comment.