Skip to content

Commit ad9c671

Browse files
Try System.Environment.Exit(0) instead of process.kill
1 parent 278c04c commit ad9c671

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

integration-test/net9-maui/App.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public static void OnAppearing()
7272
}
7373
#pragma warning restore CS0618
7474

75-
if (HasTestArg("NullReferenceException"))
75+
else if (HasTestArg("NullReferenceException"))
7676
{
7777
try
7878
{
@@ -104,7 +104,7 @@ public static void Kill()
104104
#if ANDROID
105105
// prevent auto-restart
106106
Platform.CurrentActivity?.FinishAffinity();
107-
Process.KillProcess(Process.MyPid());
107+
System.Environment.Exit(0);
108108
#elif IOS
109109
System.Environment.Exit(0);
110110
#endif

0 commit comments

Comments
 (0)