[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor] 02/07: Log name of managed proxy in exit handler.



This is an automated email from the git hooks/post-receive script.

dgoulet pushed a commit to branch main
in repository tor.

commit 0d51dfa605a83fa2b97144de12c76c7ef79e15bb
Author: Alexander Færøy <ahf@xxxxxxxxxxxxxx>
AuthorDate: Fri Sep 24 14:47:30 2021 +0200

    Log name of managed proxy in exit handler.
    
    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 | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/feature/client/transports.c b/src/feature/client/transports.c
index c5d7df479d..e8f0ed543f 100644
--- a/src/feature/client/transports.c
+++ b/src/feature/client/transports.c
@@ -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. */

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits