Skip to content

Commit 6cf785d

Browse files
Support Process.Start() on MacCatalyst (#61507)
* Modify existing tests * Enable process start and kill on MacCatalyst * Typo * Temporarily enable ProcessTests for MacCatalyst * Temporarily enable ProcessTests for MacCatalyst - attempt 2 * Allow running Mac Catalyst builds in App Sandbox * Allow enabling app sandbox for the other Mac Catalyst sample * Add missing parameter to XCode project generator * Remove unnecessary MacCatalyst detection * Enable App Sandbox for Mac Catalyst tests * Create a separate test branch for App Sandbox * Remove the restriction to enable app sandbox just for Mac Catalyst apps * Do not throw PNSE for Mac Catalyst * Clean-up platform-specific conditions * Build correct Process implementation for MacCatalyst * Try to get more information from CI for further investigation of the failing build * Revert "Try to get more information from CI for further investigation of the failing build" This reverts commit fc63a37. * Add MacCatalyst target framework for System.Diagnostics.Process * Add supported platform annotations for Mac Catalyst * Fix annotations * Remove incorrectly placed attributes * Update attributes including the reference file * Change platform attributes * Generate app.entitlements in the BuildAppleAppBundles test build target * Revert "Generate app.entitlements in the BuildAppleAppBundles test build target" This reverts commit abbe224. * Enable AppSandbox when generating CMakeLists.txt for libraries tests * Try implementing a workaround for app sandbox mode * Fix app sandbox detection bug * Add explanation comment * Enable more tests for MacCatalyst * Add apple app builder input validation * Add Mac Catalyst w/ App Sandbox enabled to runtime-manual test pipeline * Enable networking in App Sandbox mode * Skip test which won't work on Mac Catalyst * Skip some tests in app sandbox mode * Update src/tasks/AppleAppBuilder/AppleAppBuilder.cs Co-authored-by: Alexander Köplinger <[email protected]> * Add a clarification comment for a networking entitlement * Simplify supported platform condition * Remove temporarily enabled test * Remove unnecessary attributes * Replace checking env variable with checking errno in libproc * Update docs * Remove unnecessary changes * Temporarily enable running System.Diagnostics.Process.Tests for this PR This reverts commit 02d370c. * Revert "Temporarily enable running System.Diagnostics.Process.Tests for this PR" This reverts commit dc72f0f. * Fix job suffix in runtime-manual * Remove attributes * Revert "Remove attributes" This reverts commit 704e9fa. * Try changing the order of attributes to please CI * Update ApiCompat baseline * ApiCompat step 1: remove all attributes for MaxWorkingSet setter * Revert "Update ApiCompat baseline" This reverts commit a2ad032. * Revert "ApiCompat step 1: remove all attributes for MaxWorkingSet setter" This reverts commit be72a3d. * Update ApiCompat baseline * Update ApiCompat baseline after pulling upstream main * Remove trailing whitespace Co-authored-by: Alexander Köplinger <[email protected]>
1 parent 5d35bc1 commit 6cf785d

26 files changed

Lines changed: 214 additions & 39 deletions

docs/workflow/testing/libraries/testing-apple.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ To build for AOT only mode, add `/p:RunAOTCompilation=true /p:MonoEnableInterpre
108108

109109
To build for AOT-LLVM mode, add `/p:RunAOTCompilation=true /p:MonoEnableInterpreter=false /p:MonoEnableLLVM=true` to a build command.
110110

111+
4. App Sandbox
112+
113+
To build the test app bundle with the App Sandbox entitlement, add `/p:EnableAppSandbox=true` to a build command.
114+
111115
### Test App Design
112116
iOS/tvOS `*.app` (or `*.ipa`) is basically a simple [ObjC app](https://github.com/dotnet/runtime/blob/main/src/tasks/AppleAppBuilder/Templates/main-console.m) that inits the Mono Runtime. This Mono Runtime starts a simple xunit test
113117
runner called XHarness.TestRunner (see https://github.com/dotnet/xharness) which runs tests for all `*.Tests.dll` libs in the bundle. There is also XHarness.CLI tool to deploy `*.app` and `*.ipa` to a target (device or simulator) and listens for logs via network sockets.

eng/pipelines/runtime-manual.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,34 @@ jobs:
5858
interpreter: true
5959
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
6060

61+
#
62+
# MacCatalyst interp - requires AOT Compilation and Interp flags
63+
# Build the whole product using Mono and run libraries tests
64+
# The test app is built with the App Sandbox entitlement
65+
#
66+
- template: /eng/pipelines/common/platform-matrix.yml
67+
parameters:
68+
jobTemplate: /eng/pipelines/common/global-build-job.yml
69+
helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
70+
buildConfig: Release
71+
runtimeFlavor: mono
72+
platforms:
73+
- MacCatalyst_x64
74+
# don't run tests on arm64 PRs until we can get significantly more devices
75+
- ${{ if eq(variables['isFullMatrix'], true) }}:
76+
- MacCatalyst_arm64
77+
jobParameters:
78+
testGroup: innerloop
79+
nameSuffix: AllSubsets_Mono_AppSandbox
80+
buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=adhoc /p:RunAOTCompilation=true /p:MonoForceInterpreter=true /p:BuildDarwinFrameworks=true /p:EnableAppSandbox=true
81+
timeoutInMinutes: 180
82+
# extra steps, run tests
83+
extraStepsTemplate: /eng/pipelines/libraries/helix.yml
84+
extraStepsParameters:
85+
creator: dotnet-bot
86+
interpreter: true
87+
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
88+
6189
#
6290
# iOS/tvOS devices - Full AOT + AggressiveTrimming to reduce size
6391
# Build the whole product using Mono and run libraries tests

eng/pipelines/runtime-staging.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,51 @@ jobs:
154154
eq(variables['isManualOrIsNotPR'], true),
155155
eq(variables['isFullMatrix'], true))
156156
157+
#
158+
# MacCatalyst interp - requires AOT Compilation and Interp flags
159+
# Build the whole product using Mono and run libraries tests
160+
# The test app is built with the App Sandbox entitlement
161+
#
162+
- template: /eng/pipelines/common/platform-matrix.yml
163+
parameters:
164+
jobTemplate: /eng/pipelines/common/global-build-job.yml
165+
helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
166+
buildConfig: Release
167+
runtimeFlavor: mono
168+
platforms:
169+
- MacCatalyst_x64
170+
# don't run tests on arm64 PRs until we can get significantly more devices
171+
- ${{ if eq(variables['isFullMatrix'], true) }}:
172+
- MacCatalyst_arm64
173+
variables:
174+
# map dependencies variables to local variables
175+
- name: librariesContainsChange
176+
value: $[ dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ]
177+
- name: monoContainsChange
178+
value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'] ]
179+
jobParameters:
180+
testGroup: innerloop
181+
nameSuffix: AllSubsets_Mono_AppSandbox
182+
buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true $(_runSmokeTestsOnlyArg) /p:DevTeamProvisioning=adhoc /p:RunAOTCompilation=true /p:MonoForceInterpreter=true /p:BuildDarwinFrameworks=true /p:EnableAppSandbox=true
183+
timeoutInMinutes: 180
184+
condition: >-
185+
or(
186+
eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
187+
eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
188+
eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true),
189+
eq(variables['isFullMatrix'], true))
190+
# extra steps, run tests
191+
extraStepsTemplate: /eng/pipelines/libraries/helix.yml
192+
extraStepsParameters:
193+
creator: dotnet-bot
194+
interpreter: true
195+
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
196+
condition: >-
197+
or(
198+
eq(variables['librariesContainsChange'], true),
199+
eq(variables['monoContainsChange'], true),
200+
eq(variables['isFullMatrix'], true))
201+
157202
#
158203
# iOS/tvOS devices - Full AOT + AggressiveTrimming to reduce size
159204
# Build the whole product using Mono and run libraries tests

src/libraries/Common/src/Interop/OSX/Interop.libproc.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ internal static partial class libproc
2525
// Constants from sys\resource.h
2626
private const int RUSAGE_INFO_V3 = 3;
2727

28+
// Constants from sys/errno.h
29+
private const int EPERM = 1;
30+
2831
// Defines from proc_info.h
2932
internal enum ThreadRunState
3033
{
@@ -120,7 +123,14 @@ internal static unsafe int[] proc_listallpids()
120123
{
121124
// Get the number of processes currently running to know how much data to allocate
122125
int numProcesses = proc_listallpids(null, 0);
123-
if (numProcesses <= 0)
126+
if (numProcesses == 0 && Marshal.GetLastPInvokeError() == EPERM)
127+
{
128+
// An app running in App Sandbox does not have permissions to list other running processes
129+
// and so the `proc_listallpids` function returns 0 and sets errno to 1. As a fallback
130+
// we return at least an array with the PID of the current process which we always know.
131+
return new[] { Environment.ProcessId };
132+
}
133+
else if (numProcesses <= 0)
124134
{
125135
throw new Win32Exception(SR.CantGetAllPids);
126136
}

src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Unix.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ public static partial class PlatformDetection
4141
public static bool IsMacOsCatalinaOrHigher => IsOSX && Environment.OSVersion.Version >= new Version(10, 15);
4242
public static bool IsMacOsAppleSilicon => IsOSX && IsArm64Process;
4343
public static bool IsNotMacOsAppleSilicon => !IsMacOsAppleSilicon;
44+
public static bool IsAppSandbox => Environment.GetEnvironmentVariable("APP_SANDBOX_CONTAINER_ID") != null;
45+
public static bool IsNotAppSandbox => !IsAppSandbox;
4446

4547
// RedHat family covers RedHat and CentOS
4648
public static bool IsRedHatFamily => IsRedHatFamilyAndVersion();

src/libraries/System.Diagnostics.Process/ref/System.Diagnostics.Process.cs

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ public Process() { }
4343
public System.Diagnostics.ProcessModule? MainModule { get { throw null; } }
4444
public System.IntPtr MainWindowHandle { get { throw null; } }
4545
public string MainWindowTitle { get { throw null; } }
46-
public System.IntPtr MaxWorkingSet { [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios"), System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")] get { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("freebsd"), System.Runtime.Versioning.SupportedOSPlatformAttribute("macos"), System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] set { } }
47-
public System.IntPtr MinWorkingSet { [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios"), System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")] get { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("freebsd"), System.Runtime.Versioning.SupportedOSPlatformAttribute("macos"), System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] set { } }
46+
public System.IntPtr MaxWorkingSet { [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios"), System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos"), System.Runtime.Versioning.SupportedOSPlatformAttribute("maccatalyst")] get { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("freebsd"), System.Runtime.Versioning.SupportedOSPlatformAttribute("macos"), System.Runtime.Versioning.SupportedOSPlatformAttribute("maccatalyst"), System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] set { } }
47+
public System.IntPtr MinWorkingSet { [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios"), System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos"), System.Runtime.Versioning.SupportedOSPlatformAttribute("maccatalyst")] get { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("freebsd"), System.Runtime.Versioning.SupportedOSPlatformAttribute("macos"), System.Runtime.Versioning.SupportedOSPlatformAttribute("maccatalyst"), System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] set { } }
4848
public System.Diagnostics.ProcessModuleCollection Modules { get { throw null; } }
4949
[System.ObsoleteAttribute("Process.NonpagedSystemMemorySize has been deprecated because the type of the property can't represent all valid results. Use System.Diagnostics.Process.NonpagedSystemMemorySize64 instead.")]
5050
public int NonpagedSystemMemorySize { get { throw null; } }
@@ -86,9 +86,11 @@ public Process() { }
8686
public System.Diagnostics.ProcessThreadCollection Threads { get { throw null; } }
8787
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
8888
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
89+
[System.Runtime.Versioning.SupportedOSPlatformAttribute("maccatalyst")]
8990
public System.TimeSpan TotalProcessorTime { get { throw null; } }
9091
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
9192
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
93+
[System.Runtime.Versioning.SupportedOSPlatformAttribute("maccatalyst")]
9294
public System.TimeSpan UserProcessorTime { get { throw null; } }
9395
[System.ObsoleteAttribute("Process.VirtualMemorySize has been deprecated because the type of the property can't represent all valid results. Use System.Diagnostics.Process.VirtualMemorySize64 instead.")]
9496
public int VirtualMemorySize { get { throw null; } }
@@ -112,39 +114,50 @@ public static void EnterDebugMode() { }
112114
public static System.Diagnostics.Process GetProcessById(int processId, string machineName) { throw null; }
113115
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
114116
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
117+
[System.Runtime.Versioning.SupportedOSPlatformAttribute("maccatalyst")]
115118
public static System.Diagnostics.Process[] GetProcesses() { throw null; }
116119
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
117120
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
121+
[System.Runtime.Versioning.SupportedOSPlatformAttribute("maccatalyst")]
118122
public static System.Diagnostics.Process[] GetProcesses(string machineName) { throw null; }
119123
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
120124
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
125+
[System.Runtime.Versioning.SupportedOSPlatformAttribute("maccatalyst")]
121126
public static System.Diagnostics.Process[] GetProcessesByName(string? processName) { throw null; }
122127
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
123128
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
129+
[System.Runtime.Versioning.SupportedOSPlatformAttribute("maccatalyst")]
124130
public static System.Diagnostics.Process[] GetProcessesByName(string? processName, string machineName) { throw null; }
125131
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
126132
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
133+
[System.Runtime.Versioning.SupportedOSPlatformAttribute("maccatalyst")]
127134
public void Kill() { }
128135
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
129136
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
137+
[System.Runtime.Versioning.SupportedOSPlatformAttribute("maccatalyst")]
130138
public void Kill(bool entireProcessTree) { }
131139
public static void LeaveDebugMode() { }
132140
protected void OnExited() { }
133141
public void Refresh() { }
134142
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
135143
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
144+
[System.Runtime.Versioning.SupportedOSPlatformAttribute("maccatalyst")]
136145
public bool Start() { throw null; }
137146
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
138147
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
148+
[System.Runtime.Versioning.SupportedOSPlatformAttribute("maccatalyst")]
139149
public static System.Diagnostics.Process? Start(System.Diagnostics.ProcessStartInfo startInfo) { throw null; }
140150
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
141151
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
152+
[System.Runtime.Versioning.SupportedOSPlatformAttribute("maccatalyst")]
142153
public static System.Diagnostics.Process Start(string fileName) { throw null; }
143154
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
144155
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
156+
[System.Runtime.Versioning.SupportedOSPlatformAttribute("maccatalyst")]
145157
public static System.Diagnostics.Process Start(string fileName, string arguments) { throw null; }
146158
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
147159
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
160+
[System.Runtime.Versioning.SupportedOSPlatformAttribute("maccatalyst")]
148161
public static System.Diagnostics.Process Start(string fileName, System.Collections.Generic.IEnumerable<string> arguments) { throw null; }
149162
[System.CLSCompliantAttribute(false)]
150163
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
@@ -247,6 +260,7 @@ public int IdealProcessor { set { } }
247260
public System.Diagnostics.ThreadPriorityLevel PriorityLevel { [System.Runtime.Versioning.SupportedOSPlatform("windows")] [System.Runtime.Versioning.SupportedOSPlatform("linux")] [System.Runtime.Versioning.SupportedOSPlatform("freebsd")] get { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] set { } }
248261
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
249262
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
263+
[System.Runtime.Versioning.SupportedOSPlatformAttribute("maccatalyst")]
250264
public System.TimeSpan PrivilegedProcessorTime { get { throw null; } }
251265
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
252266
public System.IntPtr ProcessorAffinity { set { } }
@@ -257,9 +271,11 @@ public System.IntPtr ProcessorAffinity { set { } }
257271
public System.Diagnostics.ThreadState ThreadState { get { throw null; } }
258272
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
259273
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
274+
[System.Runtime.Versioning.SupportedOSPlatformAttribute("maccatalyst")]
260275
public System.TimeSpan TotalProcessorTime { get { throw null; } }
261276
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
262277
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
278+
[System.Runtime.Versioning.SupportedOSPlatformAttribute("maccatalyst")]
263279
public System.TimeSpan UserProcessorTime { get { throw null; } }
264280
public System.Diagnostics.ThreadWaitReason WaitReason { get { throw null; } }
265281
public void ResetIdealProcessor() { }

src/libraries/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<DefineConstants>$(DefineConstants);FEATURE_REGISTRY</DefineConstants>
44
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
5-
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-FreeBSD;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent);$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS</TargetFrameworks>
5+
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-FreeBSD;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent);$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-MacCatalyst;$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS</TargetFrameworks>
66
<Nullable>enable</Nullable>
77
<!-- Suppress unused field warnings when using PlatformNotSupportedException stubs -->
88
</PropertyGroup>
@@ -306,7 +306,7 @@
306306
<Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.SchedGetSetAffinity.cs"
307307
Link="Common\Interop\Linux\Interop.SchedGetSetAffinity.cs" />
308308
</ItemGroup>
309-
<ItemGroup Condition=" '$(TargetsOSX)' == 'true'">
309+
<ItemGroup Condition=" '$(TargetsOSX)' == 'true' or '$(TargetsMacCatalyst)' == 'true'">
310310
<Compile Include="System\Diagnostics\Process.BSD.cs" />
311311
<Compile Include="System\Diagnostics\Process.OSX.cs" />
312312
<Compile Include="System\Diagnostics\ProcessManager.BSD.cs" />

src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.BSD.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public partial class Process
1515
/// </summary>
1616
[UnsupportedOSPlatform("ios")]
1717
[UnsupportedOSPlatform("tvos")]
18+
[SupportedOSPlatform("maccatalyst")]
1819
public static Process[] GetProcessesByName(string? processName, string machineName)
1920
{
2021
if (processName == null)

src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Linux.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public partial class Process : IDisposable
2020
/// </summary>
2121
[UnsupportedOSPlatform("ios")]
2222
[UnsupportedOSPlatform("tvos")]
23+
[SupportedOSPlatform("maccatalyst")]
2324
public static Process[] GetProcessesByName(string? processName, string machineName)
2425
{
2526
ProcessManager.ThrowIfRemoteMachine(machineName);

src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.NonUap.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ public partial class Process : IDisposable
1111
{
1212
[UnsupportedOSPlatform("ios")]
1313
[UnsupportedOSPlatform("tvos")]
14+
[SupportedOSPlatform("maccatalyst")]
1415
public void Kill(bool entireProcessTree)
1516
{
1617
if (!entireProcessTree)

0 commit comments

Comments
 (0)