Fix #1606 (Call runtime._cleanup_runtime_contextless() for os.exit)

This commit is contained in:
gingerBill
2022-03-09 15:05:51 +00:00
parent 8e4d6b3e5d
commit 17eebf338c
7 changed files with 14 additions and 0 deletions
+2
View File
@@ -5,6 +5,7 @@ foreign import libc "system:c"
import "core:runtime"
import "core:strings"
import "core:c"
import "core:runtime"
Handle :: distinct i32
Pid :: distinct i32
@@ -658,6 +659,7 @@ set_current_directory :: proc(path: string) -> (err: Errno) {
}
exit :: proc "contextless" (code: int) -> ! {
runtime._cleanup_runtime_contextless()
_unix_exit(c.int(code))
}