os2: initial implementation for Darwin&BSDs, process API is only thing incomplete

This commit is contained in:
Laytan Laats
2024-08-14 01:44:37 +02:00
parent ff0ca0bd53
commit a4d459f651
23 changed files with 1535 additions and 17 deletions
+6 -3
View File
@@ -211,7 +211,7 @@ foreign lib {
[[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/_exit.html ]]
*/
_exit :: proc(status: c.int) ---
_exit :: proc(status: c.int) -> ! ---
/*
The exec family of functions shall replace the current process image with a new process image.
@@ -416,8 +416,11 @@ foreign lib {
}
cwd = posix.getcwd(raw_data(buf), len(buf))
if errno := posix.errno(); cwd == nil && errno != .ERANGE {
fmt.panicf("getcwd failure: %v", posix.strerror(errno))
if cwd == nil {
errno := posix.errno()
if errno != .ERANGE {
fmt.panicf("getcwd failure: %v", posix.strerror(errno))
}
}
}