]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Log name of managed proxy in exit handler.
authorAlexander Færøy <ahf@torproject.org>
Fri, 24 Sep 2021 12:47:30 +0000 (14:47 +0200)
committerDavid Goulet <dgoulet@torproject.org>
Thu, 25 May 2023 14:50:11 +0000 (10:50 -0400)
This patch ensures that we can figure out which PT that terminated in
the PT exit handler.

See: tpo/core/tor#33669

src/feature/client/transports.c

index c5d7df479d8d2f12e54e04497b8302c4d8822c50..e8f0ed543f82e154c9c2fbd4c8189d96a399504f 100644 (file)
@@ -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. */