44 references to ProcessUtils
System.Diagnostics.Process (44)
Microsoft\Win32\SafeHandles\SafeProcessHandle.cs (10)
135
if (!
ProcessUtils
.PlatformSupportsProcessStartAndKill)
180
if (!
ProcessUtils
.PlatformSupportsProcessStartAndKill)
185
SerializationGuard.ThrowIfDeserializationInProgress("AllowProcessCreation", ref
ProcessUtils
.s_cachedSerializationSwitch);
198
childInputHandle ??= nullDeviceHandle ?? (
ProcessUtils
.PlatformSupportsConsole ? Console.OpenStandardInputHandle() : null);
199
childOutputHandle ??= nullDeviceHandle ?? (
ProcessUtils
.PlatformSupportsConsole ? Console.OpenStandardOutputHandle() : null);
200
childErrorHandle ??= nullDeviceHandle ?? (
ProcessUtils
.PlatformSupportsConsole ? Console.OpenStandardErrorHandle() : null);
296
return TryWaitForExitCore(
ProcessUtils
.ToTimeoutMilliseconds(timeout), out exitStatus);
320
if (!
ProcessUtils
.PlatformSupportsProcessStartAndKill)
325
return WaitForExitOrKillOnTimeoutCore(
ProcessUtils
.ToTimeoutMilliseconds(timeout));
416
if (!
ProcessUtils
.PlatformSupportsProcessStartAndKill)
Microsoft\Win32\SafeHandles\SafeProcessHandle.Unix.cs (20)
111
if (!
ProcessUtils
.PlatformSupportsProcessStartAndKill)
218
ProcessUtils
.EnsureInitialized();
237
(userId, groupId, groups) =
ProcessUtils
.GetUserAndGroupIds(startInfo);
242
filename =
ProcessUtils
.ResolvePath(startInfo.FileName);
243
argv =
ProcessUtils
.ParseArgv(startInfo);
269
(userId, groupId, groups) =
ProcessUtils
.GetUserAndGroupIds(startInfo);
286
string? filename =
ProcessUtils
.ResolveExecutableForShellExecute(startInfo.FileName, cwd);
289
string[] argv =
ProcessUtils
.ParseArgv(startInfo);
310
string[] openFileArgv =
ProcessUtils
.ParseArgv(startInfo, filename, ignoreArguments: true);
327
=>
ProcessUtils
.IsTerminal(stdinHandle) ||
ProcessUtils
.IsTerminal(stdoutHandle) ||
ProcessUtils
.IsTerminal(stderrHandle);
341
throw
ProcessUtils
.CreateExceptionForErrorStartingProcess(error.GetErrorMessage(), error.RawErrno, startInfo.FileName, cwd);
348
ProcessUtils
.s_processStartLock.EnterReadLock();
353
ProcessUtils
.ConfigureTerminalForChildProcesses(1);
382
ProcessUtils
.s_processStartLock.ExitReadLock();
390
ProcessUtils
.s_processStartLock.EnterWriteLock();
391
ProcessUtils
.ConfigureTerminalForChildProcesses(-1);
392
ProcessUtils
.s_processStartLock.ExitWriteLock();
401
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));
1192
if (!
ProcessUtils
.PlatformSupportsProcessStartAndKill)
1200
SerializationGuard.ThrowIfDeserializationInProgress("AllowProcessCreation", ref
ProcessUtils
.s_cachedSerializationSwitch);
1220
bool requiresLock = anyRedirection && !
ProcessUtils
.SupportsAtomicNonInheritablePipeCreation;
1224
ProcessUtils
.s_processStartLock.EnterWriteLock();
1260
ProcessUtils
.s_processStartLock.ExitWriteLock();
1276
else if (
ProcessUtils
.PlatformSupportsConsole)
1499
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 (2)
151
?
ProcessUtils
.ToTimeoutMilliseconds(timeout.Value)
635
?
ProcessUtils
.ToTimeoutMilliseconds(timeout.Value)
System\Diagnostics\Process.Unix.cs (1)
57
if (!
ProcessUtils
.PlatformSupportsProcessStartAndKill)
System\Diagnostics\ProcessStartInfo.cs (1)
575
if (inheritedHandles is null || inheritedHandles.Length == 0 || !
ProcessUtils
.PlatformSupportsConsole)
System\Diagnostics\ProcessWaitState.Unix.cs (1)
569
ProcessUtils
.ConfigureTerminalForChildProcesses(-1, configureConsole);