-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Linux set process to kill it self when parent process dies
- Loading branch information
Showing
3 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/VoltstroStudios.UnityWebBrowser.Engine.Shared/Native/Linux/SysPrctl.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// UnityWebBrowser (UWB) | ||
// Copyright (c) 2021-2024 Voltstro-Studios | ||
// | ||
// This project is under the MIT license. See the LICENSE.md file for more details. | ||
|
||
using System.Runtime.InteropServices; | ||
using System.Runtime.Versioning; | ||
|
||
namespace VoltstroStudios.UnityWebBrowser.Engine.Shared.Native.Linux; | ||
|
||
[SupportedOSPlatform("Linux")] | ||
internal static class SysPrctl | ||
{ | ||
/// <summary> | ||
/// Operations on a process or thread | ||
/// https://www.man7.org/linux/man-pages/man2/prctl.2.html | ||
/// </summary> | ||
/// <param name="option"></param> | ||
/// <param name="arg2"></param> | ||
/// <returns></returns> | ||
[DllImport("libc")] | ||
public static extern int prctl(int option, ulong arg2); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters