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