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