diff options
| author | John Estabrook <jestabro@vyos.io> | 2025-04-16 14:51:36 -0500 |
|---|---|---|
| committer | John Estabrook <jestabro@vyos.io> | 2025-05-12 11:26:41 -0500 |
| commit | c6a09cc9fce42323d86d2f4e161a894cdc970a24 (patch) | |
| tree | 0d82f98183bbf16d6a4a6d5c5c4d32c29eb3f24f /src/vyconf_client_session.ml | |
| parent | c508c8c66c76488337745cf151d9570c42e38a3b (diff) | |
| download | vyconf-c6a09cc9fce42323d86d2f4e161a894cdc970a24.tar.gz vyconf-c6a09cc9fce42323d86d2f4e161a894cdc970a24.zip | |
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.
Diffstat (limited to 'src/vyconf_client_session.ml')
| -rw-r--r-- | src/vyconf_client_session.ml | 3 |
1 files changed, 2 insertions, 1 deletions
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 |
