Request: Expose parent process ID on the Process class

Đang mở
#137,203 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
22/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp
Lĩnh vực
operating-systems

Hướng nghiên cứu

The work centres on the Parent property of System.Diagnostics.Process, which the issue says is slow and returns an object already present in GetProcesses. Start by reading how Parent is resolved in the Process implementation for each OS. The request is for a ParentId or ParentProcessId property, so this needs an API proposal and review before any code. Done means an approved API, implementations on each platform, and tests that check the parent id against Parent.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area-System.Diagnostics.Process untriaged

Currently the System.Diagnostics.Process exposes a Parent property which returns the parent process class.
When building a processes tree, we can get all processes (GetProcesses) but the performances of the Parent property are catastrophic and returning an object that is already in the list of processes.
Exposing a ParentId or ParentProcessId would simplify and speed up this process.

Workaround

Under Windows getting the WMI_Process solves the problem, but it is a Windows-only solution.

Usecase

I am creating a usage summary per capability where processes are identified to belonging to a certain group.
Once a process is identified, all its children are part of its capability, so of its summary.

Ngôn ngữ chính
C#
Star
18.4k
Fork
5.8k
Merge trung bình
2 ngày 19 giờ
Pull request đã merge (30 ngày)
590

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của dotnet/runtime

Tất cả issue của dotnet/runtime

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.