Problem
Provider and job-handler child processes carry nothing on their command line that identifies which app instance spawned them. NodeProcessProxy forks with env: { ...process.env }, so children inherit the full environment, but fork(this._modulePath, this._processArgs, ...) passes no instance-identifying token in argv.
That matters because argv is the only channel visible from outside the process. Anything that needs to attribute a stray helper to an instance -- a cleanup pass, a diagnostic, an operator looking at ps after a crash -- has no way to do it. Orphaned helpers hold ports, locks, and memory in production, not just in test runs.
Constraint
The token must be opaque. It must not be the user data directory path or anything derived from it: command lines are world-readable via ps, so putting that path in argv would expose the user's home directory to every process on the machine.
Evidence
src/Standalone/app/main/NodeChildProcess/NodeProcessProxy.ts:38-47 -- builds envVars from process.env and forks with this._processArgs
Context
Surfaced during E2E harness work, where the test teardown has to snapshot the process tree before quitting precisely because descendants cannot be identified afterward. Fixing this would let that snapshot be replaced with a direct match. The change lands in the provider host spawn path shared by every extension, so it was left out of the harness PR.
Problem
Provider and job-handler child processes carry nothing on their command line that identifies which app instance spawned them.
NodeProcessProxyforks withenv: { ...process.env }, so children inherit the full environment, butfork(this._modulePath, this._processArgs, ...)passes no instance-identifying token in argv.That matters because argv is the only channel visible from outside the process. Anything that needs to attribute a stray helper to an instance -- a cleanup pass, a diagnostic, an operator looking at
psafter a crash -- has no way to do it. Orphaned helpers hold ports, locks, and memory in production, not just in test runs.Constraint
The token must be opaque. It must not be the user data directory path or anything derived from it: command lines are world-readable via
ps, so putting that path in argv would expose the user's home directory to every process on the machine.Evidence
src/Standalone/app/main/NodeChildProcess/NodeProcessProxy.ts:38-47-- buildsenvVarsfromprocess.envand forks withthis._processArgsContext
Surfaced during E2E harness work, where the test teardown has to snapshot the process tree before quitting precisely because descendants cannot be identified afterward. Fixing this would let that snapshot be replaced with a direct match. The change lands in the provider host spawn path shared by every extension, so it was left out of the harness PR.