39 references to ProcPid
System.Diagnostics.Process (39)
src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcFsStat.cs (16)
75
internal static string GetExeFilePathForProcess(
ProcPid
pid) =>
76
pid ==
ProcPid
.Self ? $"{RootPath}{Self}{ExeFileName}" :
79
internal static string GetCmdLinePathForProcess(
ProcPid
pid) =>
80
pid ==
ProcPid
.Self ? $"{RootPath}{Self}{CmdLineFileName}" :
83
internal static string GetStatFilePathForProcess(
ProcPid
pid) =>
84
pid ==
ProcPid
.Self ? $"{RootPath}{Self}{StatFileName}" :
87
internal static string GetTaskDirectoryPathForProcess(
ProcPid
pid) =>
88
pid ==
ProcPid
.Self ? $"{RootPath}{Self}{TaskDirectoryName}" :
91
internal static string GetFileDescriptorDirectoryPathForProcess(
ProcPid
pid) =>
92
pid ==
ProcPid
.Self ? $"{RootPath}{Self}{FileDescriptorDirectoryName}" :
95
private static string GetStatFilePathForThread(
ProcPid
pid, int tid) =>
96
pid ==
ProcPid
.Self ? string.Create(null, stackalloc char[256], $"{RootPath}{Self}{TaskDirectoryName}{(uint)tid}{StatFileName}") :
99
internal static bool TryReadStatFile(
ProcPid
pid, out ParsedStat result)
102
Debug.Assert(!b || pid ==
ProcPid
.Self|| (
ProcPid
)result.pid == pid, "Expected process ID from stat file to match supplied pid");
106
internal static bool TryReadStatFile(
ProcPid
pid, int tid, out ParsedStat result)
src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcFsStat.ParseMapModules.cs (3)
18
private static string GetMapsFilePathForProcess(
ProcPid
pid) =>
19
pid ==
ProcPid
.Self ? $"{RootPath}{Self}{MapsFileName}" :
22
internal static ProcessModuleCollection? ParseMapsModules(
ProcPid
pid)
src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcFsStat.TryReadStatusFile.cs (5)
53
internal static string GetStatusFilePathForProcess(
ProcPid
pid) =>
54
pid ==
ProcPid
.Self ? $"{RootPath}{Self}{StatusFileName}" :
57
internal static bool TryReadStatusFile(
ProcPid
pid, out ParsedStatus result)
61
Debug.Assert(!b || (
ProcPid
)result.Pid == pid || pid ==
ProcPid
.Self, "Expected process ID from status file to match supplied pid");
System\Diagnostics\Process.Linux.cs (5)
34
if (ProcessManager.TryGetProcPid(pid, out Interop.procfs.
ProcPid
procPid) &&
163
if (!ProcessManager.TryGetProcPid(_processId, out Interop.procfs.
ProcPid
procPid))
259
internal static string? GetExePath(Interop.procfs.
ProcPid
procPid)
261
return procPid == Interop.procfs.
ProcPid
.Self ? Environment.ProcessPath :
268
internal static string GetUntruncatedProcessName(Interop.procfs.
ProcPid
procPid, ref Interop.procfs.ParsedStat stat)
System\Diagnostics\ProcessManager.Linux.cs (10)
47
if (TryGetProcPid(processId, out Interop.procfs.
ProcPid
procPid))
78
if (TryGetProcPid(pid, out Interop.procfs.
ProcPid
procPid) &&
90
internal static ProcessInfo CreateProcessInfo(Interop.procfs.
ProcPid
procPid, ref Interop.procfs.ParsedStat procFsStat, ref Interop.procfs.ParsedStatus procFsStatus, string? processName = null)
217
if (!TryGetProcPid(pid, out Interop.procfs.
ProcPid
procPid))
227
if (!TryGetProcPid(pid, out Interop.procfs.
ProcPid
procPid))
237
if (!TryGetProcPid(pid, out Interop.procfs.
ProcPid
procPid))
245
internal static bool TryGetProcPid(int pid, out Interop.procfs.
ProcPid
procPid)
250
procPid = Interop.procfs.
ProcPid
.Self;
256
procPid = (Interop.procfs.
ProcPid
)pid;
261
procPid = Interop.procfs.
ProcPid
.Invalid;