Skip to content

Commit

Permalink
Log name of managed proxy in exit handler.
Browse files Browse the repository at this point in the history
This patch ensures that we can figure out which PT that terminated in
the PT exit handler.

See: tpo/core/tor#33669
  • Loading branch information
ahf authored and dgoulet-tor committed May 25, 2023
1 parent 5118a80 commit 0d51dfa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/feature/client/transports.c
Original file line number Diff line number Diff line change
Expand Up @@ -1941,9 +1941,12 @@ managed_proxy_exit_callback(process_t *process, process_exit_code_t exit_code)
{
tor_assert(process);

const managed_proxy_t *mp = process_get_data(process);
const char *name = mp ? mp->argv[0] : "N/A";

log_warn(LD_PT,
"Pluggable Transport process terminated with status code %" PRIu64,
exit_code);
"Managed proxy \"%s\" process terminated with status code %" PRIu64,
name, exit_code);

/* Returning true here means that the process subsystem will take care of
* calling process_free() on our process_t. */
Expand Down

0 comments on commit 0d51dfa

Please sign in to comment.