microsoft / microsoft/AzureStorageExplorer
Child processes carry no instance identifier in argv
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 452
- Forks
- 92
- Avg merge
- 15h 20m
- Merged PRs (30d)
- 3
Description
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-- buildsenvVarsfromprocess.envand forks withthis._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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/Standalone/app/main/NodeChildProcess/NodeProcessProxy.ts:38-47, then trace the provider host spawn path that uses this._processArgs. Verify that spawned provider and job-handler children expose an opaque instance token in argv without revealing the user data directory, and confirm the token supports identifying descendants externally.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- backend, desktop
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100