mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 00:02:28 +00:00
Improve upon the new pledge command
This commit is contained in:
parent
b707fca77a
commit
1d744ea11b
13 changed files with 382 additions and 64 deletions
|
@ -43,6 +43,11 @@ privileged wontreturn void _Exit(int exitcode) {
|
|||
: /* no outputs */
|
||||
: "a"(__NR_exit_group), "D"(exitcode)
|
||||
: "rcx", "r11", "memory");
|
||||
// this should only be possible on Linux in a pledge ultra sandbox
|
||||
asm volatile("syscall"
|
||||
: /* no outputs */
|
||||
: "a"(__NR_exit), "D"(exitcode)
|
||||
: "rcx", "r11", "memory");
|
||||
} else if (IsWindows()) {
|
||||
ExitProcess(exitcode);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue