commit fa6d196321fe4e34ed4dc1d084d2c6e6f3ad590b
parent e5fb5176ba629e98ace5fcb3aa427b2c25d8fdf0
Author: Sebastian <sebastian@sebsite.pw>
Date: Fri, 29 Apr 2022 23:30:02 -0400
rt: check for fork failure in compile
Signed-off-by: Sebastian <sebastian@sebsite.pw>
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/rt/compile.ha b/rt/compile.ha
@@ -24,6 +24,7 @@ export fn compile(src: const str) int = {
execve(constchar(path), &argv, &envp);
abort();
} else {
+ assert(child != -1, "fork(2) failed");
close(pipefd[0]);
const buf = constchar(src): *const [*]u8;