From c6a09cc9fce42323d86d2f4e161a894cdc970a24 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Wed, 16 Apr 2025 14:51:36 -0500 Subject: T7363: track process id in session data In practice, this may be passed in the request as the ppid, as needed for CLI applications to coordinate with the ambient config session. For other uses, the client pid will suffice. --- src/vyconfd.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/vyconfd.ml') diff --git a/src/vyconfd.ml b/src/vyconfd.ml index 9eaee6b..b0b4e52 100644 --- a/src/vyconfd.ml +++ b/src/vyconfd.ml @@ -51,8 +51,9 @@ let make_session_token () = let setup_session world req = let token = make_session_token () in let user = "unknown user" in + let pid = req.client_pid in let client_app = Option.value req.client_application ~default:"unknown client" in - let () = Hashtbl.add sessions token (Session.make world client_app user) in + let () = Hashtbl.add sessions token (Session.make world client_app user pid) in {response_tmpl with output=(Some token)} let find_session token = Hashtbl.find sessions token -- cgit v1.2.3