55 references to ProcessUtils
System.Diagnostics.Process (55)
Microsoft\Win32\SafeHandles\SafeProcessHandle.cs (10)
135if (!ProcessUtils.PlatformSupportsProcessStartAndKill) 180if (!ProcessUtils.PlatformSupportsProcessStartAndKill) 185SerializationGuard.ThrowIfDeserializationInProgress("AllowProcessCreation", ref ProcessUtils.s_cachedSerializationSwitch); 198childInputHandle ??= nullDeviceHandle ?? (ProcessUtils.PlatformSupportsConsole ? Console.OpenStandardInputHandle() : null); 199childOutputHandle ??= nullDeviceHandle ?? (ProcessUtils.PlatformSupportsConsole ? Console.OpenStandardOutputHandle() : null); 200childErrorHandle ??= nullDeviceHandle ?? (ProcessUtils.PlatformSupportsConsole ? Console.OpenStandardErrorHandle() : null); 306return TryWaitForExitCore(ProcessUtils.ToTimeoutMilliseconds(timeout), out exitStatus); 330if (!ProcessUtils.PlatformSupportsProcessStartAndKill) 335return WaitForExitOrKillOnTimeoutCore(ProcessUtils.ToTimeoutMilliseconds(timeout)); 426if (!ProcessUtils.PlatformSupportsProcessStartAndKill)
Microsoft\Win32\SafeHandles\SafeProcessHandle.Unix.cs (29)
109if (!ProcessUtils.PlatformSupportsProcessStartAndKill) 211ProcessUtils.EnsureInitialized(); 230(userId, groupId, groups) = ProcessUtils.GetUserAndGroupIds(startInfo); 235filename = ProcessUtils.ResolveValidPath(startInfo.FileName, cwd); 236argv = ProcessUtils.ParseArgv(startInfo); 250ProcessUtils.EnsureInitialized(); 252string resolvedFileName = ProcessUtils.ResolveValidPath(startInfo.FileName, startInfo.WorkingDirectory); 254string[] argv = ProcessUtils.ParseArgv(startInfo); 299ProcessUtils.s_processStartLock.EnterReadLock(); 305ProcessUtils.ConfigureTerminalForChildProcesses(1); 320ProcessUtils.s_processStartLock.ExitReadLock(); 328ProcessUtils.s_processStartLock.EnterWriteLock(); 329ProcessUtils.ConfigureTerminalForChildProcesses(-1); 330ProcessUtils.s_processStartLock.ExitWriteLock(); 368(userId, groupId, groups) = ProcessUtils.GetUserAndGroupIds(startInfo); 385string? filename = ProcessUtils.ResolveExecutableForShellExecute(startInfo.FileName, cwd); 388string[] argv = ProcessUtils.ParseArgv(startInfo); 409string[] openFileArgv = ProcessUtils.ParseArgv(startInfo, filename, ignoreArguments: true); 426=> ProcessUtils.IsTerminal(stdinHandle) || ProcessUtils.IsTerminal(stdoutHandle) || ProcessUtils.IsTerminal(stderrHandle); 440throw ProcessUtils.CreateExceptionForErrorStartingProcess(error.GetErrorMessage(), error.RawErrno, startInfo.FileName, cwd); 447ProcessUtils.s_processStartLock.EnterReadLock(); 452ProcessUtils.ConfigureTerminalForChildProcesses(1); 479ProcessUtils.s_processStartLock.ExitReadLock(); 487ProcessUtils.s_processStartLock.EnterWriteLock(); 488ProcessUtils.ConfigureTerminalForChildProcesses(-1); 489ProcessUtils.s_processStartLock.ExitWriteLock(); 498throw ProcessUtils.CreateExceptionForErrorStartingProcess(new Interop.ErrorInfo(errno).GetErrorMessage(), errno, resolvedFilename, cwd);
System\Diagnostics\Process.cs (9)
752public bool WaitForInputIdle(TimeSpan timeout) => WaitForInputIdle(ProcessUtils.ToTimeoutMilliseconds(timeout)); 1192if (!ProcessUtils.PlatformSupportsProcessStartAndKill) 1200SerializationGuard.ThrowIfDeserializationInProgress("AllowProcessCreation", ref ProcessUtils.s_cachedSerializationSwitch); 1260bool requiresLock = anyRedirection && !ProcessUtils.SupportsAtomicNonInheritablePipeCreation; 1264ProcessUtils.s_processStartLock.EnterWriteLock(); 1300ProcessUtils.s_processStartLock.ExitWriteLock(); 1316else if (ProcessUtils.PlatformSupportsConsole) 1382SerializationGuard.ThrowIfDeserializationInProgress("AllowProcessCreation", ref ProcessUtils.s_cachedSerializationSwitch); 1577public bool WaitForExit(TimeSpan timeout) => WaitForExit(ProcessUtils.ToTimeoutMilliseconds(timeout));
System\Diagnostics\Process.Linux.cs (1)
77string? pathToProgram = ProcessUtils.FindProgramInPath(program);
System\Diagnostics\Process.Multiplexing.cs (2)
151? ProcessUtils.ToTimeoutMilliseconds(timeout.Value) 635? ProcessUtils.ToTimeoutMilliseconds(timeout.Value)
System\Diagnostics\Process.Unix.cs (1)
57if (!ProcessUtils.PlatformSupportsProcessStartAndKill)
System\Diagnostics\ProcessStartInfo.cs (1)
586if (inheritedHandles is null || inheritedHandles.Length == 0 || !ProcessUtils.PlatformSupportsConsole)
System\Diagnostics\ProcessWaitState.Unix.cs (1)
569ProcessUtils.ConfigureTerminalForChildProcesses(-1, configureConsole);
System\Runtime\InteropServices\UnixProcessStartArguments.cs (1)
114if (!ProcessUtils.PlatformSupportsProcessStartAndKill)