21 references to NativeMethods
dotnet.Tests (6)
CommandTests\Run\GivenDotnetRunIsInterrupted.cs (6)
54
NativeMethods
.Posix.kill(testProcess.Id,
NativeMethods
.Posix.SIGINT).Should().Be(0); // dotnet run
57
NativeMethods
.Posix.kill(Convert.ToInt32(line),
NativeMethods
.Posix.SIGINT).Should().Be(0); // TestAppThatWaits
119
NativeMethods
.Posix.kill(testProcess.Id,
NativeMethods
.Posix.SIGTERM).Should().Be(0);
Microsoft.DotNet.Cli.Utils (15)
Extensions\ProcessExtensions.cs (4)
42
NativeMethods
.Windows.PROCESS_BASIC_INFORMATION info;
44
if (
NativeMethods
.Windows.NtQueryInformationProcess(handle,
NativeMethods
.Windows.ProcessBasicInformation,
45
&info, (uint)sizeof(
NativeMethods
.Windows.PROCESS_BASIC_INFORMATION), out _) != 0)
ProcessReaper.cs (10)
104
var job =
NativeMethods
.Windows.CreateJobObjectW(IntPtr.Zero, null);
116
if (!
NativeMethods
.Windows.AssignProcessToJobObject(job.DangerousGetHandle(), process))
143
if (!_process.WaitForExit(0) &&
NativeMethods
.Posix.kill(processId,
NativeMethods
.Posix.SIGTERM) != 0)
157
var information = new
NativeMethods
.Windows.JobObjectExtendedLimitInformation
159
BasicLimitInformation = new
NativeMethods
.Windows.JobObjectBasicLimitInformation
161
LimitFlags = (value ?
NativeMethods
.Windows.JobObjectLimitFlags.JobObjectLimitKillOnJobClose : 0)
165
var length = Marshal.SizeOf(typeof(
NativeMethods
.Windows.JobObjectExtendedLimitInformation));
172
if (!
NativeMethods
.Windows.SetInformationJobObject(
174
NativeMethods
.Windows.JobObjectInfoClass.JobObjectExtendedLimitInformation,
Windows.cs (1)
41
Marshal.PtrToStringAuto(
NativeMethods
.Windows.GetCommandLine());