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/vycli.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/vycli.ml')
| -rw-r--r-- | src/vycli.ml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vycli.ml b/src/vycli.ml index 75e92b5..174d6f4 100644 --- a/src/vycli.ml +++ b/src/vycli.ml @@ -67,7 +67,8 @@ let main socket op path out_format config_format = | _ -> Error (Option.value resp.error ~default:"") |> Lwt.return end | OpSetupSession -> - let%lwt resp = setup_session client "vycli" in + let pid = Int32.of_int (Unix.getppid ()) in + let%lwt resp = setup_session client "vycli" pid in begin match resp with | Ok c -> get_token c |
