hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 175bc3160a89898bc7bc085f507d3db19612f97e
parent ea24195f556148d8e53f951c50c8d566c1533fcf
Author: Drew DeVault <sir@cmpwn.com>
Date:   Sun,  7 Feb 2021 16:16:49 -0500

rt: use clone instead of fork

fork is not available on all Linux arches

Diffstat:
Mrt/+linux/syscalls.ha | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rt/+linux/syscalls.ha b/rt/+linux/syscalls.ha @@ -50,7 +50,7 @@ export fn execveat(dirfd: int, path: *const char, argv: *[*]nullable *const char // Returns the new PID to the parent, void to the child, or errno if something // goes wrong. export fn fork() (int | void | errno) = { - return match (wrap_return(syscall0(SYS_fork))) { + return match (wrap_return(syscall2(SYS_clone, SIGCHLD: u64, 0u64))) { u: u64 => switch (u) { 0u64 => void, * => u: int,