82 references to Sys
System.Diagnostics.Process (82)
LibraryImports.g.cs (11)
79private static partial int PathConf(string path, global::Interop.Sys.PathConfName name) 108static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.PathConfName __name_native); 117internal static partial int FStat(global::System.Runtime.InteropServices.SafeHandle fd, out global::Interop.Sys.FileStatus output) 130fixed (global::Interop.Sys.FileStatus* __output_native = &output) 149static extern unsafe int __PInvoke(nint __fd_native, global::Interop.Sys.FileStatus* __output_native); 158internal static partial int Stat(string path, out global::Interop.Sys.FileStatus output) 171fixed (global::Interop.Sys.FileStatus* __output_native = &output) 190static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.FileStatus* __output_native); 199internal static partial int LStat(string path, out global::Interop.Sys.FileStatus output) 212fixed (global::Interop.Sys.FileStatus* __output_native = &output) 231static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.FileStatus* __output_native);
Microsoft\Win32\SafeHandles\SafeProcessHandle.Unix.cs (4)
69int signalNumber = Interop.Sys.GetPlatformSignalNumber(signal); 75int killResult = Interop.Sys.Kill(ProcessId, signalNumber); 78Interop.ErrorInfo errorInfo = Interop.Sys.GetLastErrorInfo(); 254errno = Interop.Sys.ForkAndExecProcess(
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (3)
124_error = Interop.Sys.ConvertErrorPlatformToPal(errno); 141get { return _rawErrno == -1 ? (_rawErrno = Interop.Sys.ConvertErrorPalToPlatform(_error)) : _rawErrno; } 146return Interop.Sys.StrError(RawErrno);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetGroupList.cs (1)
26rv = Interop.Sys.GetGroupList(userName, primaryGroupId, pGroups, &ngroups);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetPwUid.cs (3)
37const int BufLen = Interop.Sys.Passwd.InitialBufferSize; 64Interop.Sys.Passwd passwd; 65int error = Interop.Sys.GetPwUidR(uid, out passwd, buf, bufLen);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.IsMemberOfGroup.cs (2)
30rv = Interop.Sys.GetGroups(groups.Length, pGroups); 38else if (rv == -1 && Interop.Sys.GetLastError() == Interop.Error.EINVAL)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.MountPoints.FormatInfo.cs (1)
31string? path = Sys.RealPath(name);
System\Diagnostics\Process.Linux.cs (4)
56bootTimeTicks = Interop.Sys.GetBootTimeTicks(); 157if (Interop.Sys.SchedGetAffinity(_processId, out set) != 0) 168if (Interop.Sys.SchedSetAffinity(_processId, ref value) != 0) 228Interop.Sys.ReadLink(Interop.procfs.GetExeFilePathForProcess(procPid));
System\Diagnostics\Process.Multiplexing.Unix.cs (6)
32if (Interop.Sys.Fcntl.DangerousSetIsNonBlocking(outputFd, 1) != 0 || Interop.Sys.Fcntl.DangerousSetIsNonBlocking(errorFd, 1) != 0) 80Interop.Error error = Interop.Sys.Poll(pPollFds, (uint)numFds, pollTimeout, &triggered); 90throw new Win32Exception(Interop.Sys.ConvertErrorPalToPlatform(error)); 141int bytesRead = Interop.Sys.Read(handle, pBuffer + offset, buffer.Length - offset); 144Interop.ErrorInfo errorInfo = Interop.Sys.GetLastErrorInfo();
System\Diagnostics\Process.Unix.cs (15)
72int killResult = Interop.Sys.Kill(_processId, Interop.Sys.GetPlatformSignalNumber(PosixSignal.SIGKILL)); 75Interop.Error error = Interop.Sys.GetLastError(); 108int stopResult = Interop.Sys.Kill(_processId, Interop.Sys.GetPlatformSIGSTOP()); 111Interop.Error error = Interop.Sys.GetLastError(); 122int killResult = Interop.Sys.Kill(_processId, Interop.Sys.GetPlatformSignalNumber(PosixSignal.SIGKILL)); 125Interop.Error error = Interop.Sys.GetLastError(); 262int errno = Interop.Sys.GetPriority(Interop.Sys.PriorityWhich.PRIO_PROCESS, _processId, out int pri); 294int result = Interop.Sys.SetPriority(Interop.Sys.PriorityWhich.PRIO_PROCESS, _processId, pri); 385ticksPerSecond = Interop.Sys.SysConf(Interop.Sys.SysConfName._SC_CLK_TCK);
System\Diagnostics\ProcessManager.Linux.cs (1)
291if (Interop.Sys.ReadLink($"{Interop.procfs.RootPath}{Interop.procfs.Self}") is string target &&
System\Diagnostics\ProcessManager.Unix.cs (3)
30int output = Interop.Sys.Kill(processId, 0); 32return 0 == output || (-1 == output && Interop.Error.EPERM == Interop.Sys.GetLastError()); 49machineName != Interop.Sys.GetHostName();
System\Diagnostics\ProcessThread.Linux.cs (1)
24return Interop.Sys.GetThreadPriorityFromNiceValue((int)stat.nice);
System\Diagnostics\ProcessUtils.ConfigureTerminalForChildProcesses.Unix.cs (5)
25Interop.Sys.ConfigureTerminalForChildProcess(childUsesTerminal: true); 34Interop.Sys.ConfigureTerminalForChildProcess(childUsesTerminal: false); 41Interop.Sys.SetDelayedSigChildConsoleConfigurationHandler(&DelayedSigChildConsoleConfiguration); 54Interop.Sys.ConfigureTerminalForChildProcess(childUsesTerminal: false); 65internal static bool IsTerminal(SafeFileHandle? standardHandle) => standardHandle is not null && Interop.Sys.IsATty(standardHandle);
System\Diagnostics\ProcessUtils.Unix.cs (17)
22internal static bool SupportsAtomicNonInheritablePipeCreation => Interop.Sys.IsAtomicNonInheritablePipeCreationSupported; 26Interop.Sys.FileStatus fileinfo; 28if (Interop.Sys.Stat(fullPath, out fileinfo) < 0) 34if ((fileinfo.Mode & Interop.Sys.FileTypes.S_IFMT) == Interop.Sys.FileTypes.S_IFDIR) 53uint euid = Interop.Sys.GetEUid(); 75if (Interop.Sys.IsMemberOfGroup(fileinfo.Gid)) 96if (!Interop.Sys.InitializeTerminalAndSignalHandling()) 102Interop.Sys.RegisterForSigChld(&OnSigChild); 122uint[]? groups = Interop.Sys.GetGroupList(startInfo.UserName, groupId!.Value); 133Interop.Sys.Passwd? passwd; 137const int BufLen = Interop.Sys.Passwd.InitialBufferSize; 169private static unsafe bool TryGetPasswd(string name, byte* buf, int bufLen, out Interop.Sys.Passwd? passwd) 172Interop.Sys.Passwd tempPasswd; 173int error = Interop.Sys.GetPwNamR(name, out tempPasswd, buf, bufLen); 251if (Interop.Sys.Access(resolvedFilename, Interop.Sys.AccessMode.X_OK) == 0)
System\Diagnostics\ProcessWaitState.Unix.cs (5)
354int killResult = Interop.Sys.Kill(_processId, 0); // 0 means don't send a signal, used to check if process is still alive 364Interop.Error errno = Interop.Sys.GetLastError(); 571int waitResult = Interop.Sys.WaitPidExitedNoHang(_processId, out exitCode); 605pid = Interop.Sys.WaitIdAnyExitedNoHangNoWait(); 676pid = Interop.Sys.WaitPidExitedNoHang(-1, out exitCode);