42 references to ProcessUtils
System.Diagnostics.Process (42)
Microsoft\Win32\SafeHandles\SafeProcessHandle.cs (9)
95
if (!
ProcessUtils
.PlatformSupportsProcessStartAndKill)
100
SerializationGuard.ThrowIfDeserializationInProgress("AllowProcessCreation", ref
ProcessUtils
.s_cachedSerializationSwitch);
113
childInputHandle ??= nullDeviceHandle ?? (
ProcessUtils
.PlatformSupportsConsole ? Console.OpenStandardInputHandle() : null);
114
childOutputHandle ??= nullDeviceHandle ?? (
ProcessUtils
.PlatformSupportsConsole ? Console.OpenStandardOutputHandle() : null);
115
childErrorHandle ??= nullDeviceHandle ?? (
ProcessUtils
.PlatformSupportsConsole ? Console.OpenStandardErrorHandle() : null);
198
return TryWaitForExitCore(
ProcessUtils
.ToTimeoutMilliseconds(timeout), out exitStatus);
222
if (!
ProcessUtils
.PlatformSupportsProcessStartAndKill)
227
return WaitForExitOrKillOnTimeoutCore(
ProcessUtils
.ToTimeoutMilliseconds(timeout));
318
if (!
ProcessUtils
.PlatformSupportsProcessStartAndKill)
Microsoft\Win32\SafeHandles\SafeProcessHandle.Unix.cs (20)
80
if (!
ProcessUtils
.PlatformSupportsProcessStartAndKill)
182
ProcessUtils
.EnsureInitialized();
201
(userId, groupId, groups) =
ProcessUtils
.GetUserAndGroupIds(startInfo);
206
filename =
ProcessUtils
.ResolvePath(startInfo.FileName);
207
argv =
ProcessUtils
.ParseArgv(startInfo);
233
(userId, groupId, groups) =
ProcessUtils
.GetUserAndGroupIds(startInfo);
250
string? filename =
ProcessUtils
.ResolveExecutableForShellExecute(startInfo.FileName, cwd);
253
string[] argv =
ProcessUtils
.ParseArgv(startInfo);
274
string[] openFileArgv =
ProcessUtils
.ParseArgv(startInfo, filename, ignoreArguments: true);
291
=>
ProcessUtils
.IsTerminal(stdinHandle) ||
ProcessUtils
.IsTerminal(stdoutHandle) ||
ProcessUtils
.IsTerminal(stderrHandle);
305
throw
ProcessUtils
.CreateExceptionForErrorStartingProcess(error.GetErrorMessage(), error.RawErrno, startInfo.FileName, cwd);
312
ProcessUtils
.s_processStartLock.EnterReadLock();
317
ProcessUtils
.ConfigureTerminalForChildProcesses(1);
344
ProcessUtils
.s_processStartLock.ExitReadLock();
352
ProcessUtils
.s_processStartLock.EnterWriteLock();
353
ProcessUtils
.ConfigureTerminalForChildProcesses(-1);
354
ProcessUtils
.s_processStartLock.ExitWriteLock();
363
throw
ProcessUtils
.CreateExceptionForErrorStartingProcess(new Interop.ErrorInfo(errno).GetErrorMessage(), errno, resolvedFilename, cwd);
System\Diagnostics\Process.cs (8)
752
public bool WaitForInputIdle(TimeSpan timeout) => WaitForInputIdle(
ProcessUtils
.ToTimeoutMilliseconds(timeout));
1167
if (!
ProcessUtils
.PlatformSupportsProcessStartAndKill)
1175
SerializationGuard.ThrowIfDeserializationInProgress("AllowProcessCreation", ref
ProcessUtils
.s_cachedSerializationSwitch);
1195
bool requiresLock = anyRedirection && !
ProcessUtils
.SupportsAtomicNonInheritablePipeCreation;
1199
ProcessUtils
.s_processStartLock.EnterWriteLock();
1235
ProcessUtils
.s_processStartLock.ExitWriteLock();
1251
else if (
ProcessUtils
.PlatformSupportsConsole)
1472
public bool WaitForExit(TimeSpan timeout) => WaitForExit(
ProcessUtils
.ToTimeoutMilliseconds(timeout));
System\Diagnostics\Process.Linux.cs (1)
77
string? pathToProgram =
ProcessUtils
.FindProgramInPath(program);
System\Diagnostics\Process.Multiplexing.cs (1)
389
?
ProcessUtils
.ToTimeoutMilliseconds(timeout.Value)
System\Diagnostics\Process.Unix.cs (1)
57
if (!
ProcessUtils
.PlatformSupportsProcessStartAndKill)
System\Diagnostics\ProcessStartInfo.cs (1)
544
if (inheritedHandles is null || inheritedHandles.Length == 0 || !
ProcessUtils
.PlatformSupportsConsole)
System\Diagnostics\ProcessWaitState.Unix.cs (1)
569
ProcessUtils
.ConfigureTerminalForChildProcesses(-1, configureConsole);