fix(process): gate sampling on initialized PTY root
This commit is contained in:
@@ -104,6 +104,13 @@ const systemHost: ProcessOwnershipHost = {
|
||||
},
|
||||
};
|
||||
|
||||
/** Read the capture run token currently exposed by one live process. */
|
||||
export const readProcessRunId = async (
|
||||
pid: number,
|
||||
host: ProcessOwnershipHost = systemHost,
|
||||
): Promise<string | undefined> =>
|
||||
(await host.environment(pid)).REA_PROCESS_RUN_ID;
|
||||
|
||||
/**
|
||||
* Verify run-token ownership before signaling a POSIX process group.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user