Suggestion: Set parent process id (InheritedFromUniqueProcessId) on exec to nt process representing parent
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 33.7k
- Forks
- 1.8k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 116
Description
I have noticed that when a WSL process exec's then a new nt process is created that is linked to the WSL process. This means that with a usual fork/exec pattern the parent pid of the nt view of the process points to the no longer existent short lived process representing the forked process. This in turn results in diagnostic tools trying to show processes in a tree view won't be able to show the relationship of WSL processes, see e.g. processhacker2/processhacker#153
Contributor guide
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 by tracing WSL's fork/exec process-creation path and how the NT process's InheritedFromUniqueProcessId is assigned. Use the Process Hacker issue and its process-tree behavior as the observable reference. Done means an exec-created NT process points to the NT process representing its actual parent, so diagnostic tree views preserve the WSL process relationship.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100