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/vyconf_client_session.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/vyconf_client_session.ml') diff --git a/src/vyconf_client_session.ml b/src/vyconf_client_session.ml index 407aaff..93068fa 100644 --- a/src/vyconf_client_session.ml +++ b/src/vyconf_client_session.ml @@ -33,7 +33,8 @@ let call_op ?(out_format="plain") ?(config_format="curly") socket token op path begin match o with | OpSetupSession -> - let%lwt resp = Vyconf_client.setup_session client "vyconf_client_session" in + let pid = Int32.of_int (Unix.getppid ()) in + let%lwt resp = Vyconf_client.setup_session client "vyconf_client_session" pid in begin match resp with | Ok c -> Vyconf_client.get_token c -- cgit v1.2.3