summaryrefslogtreecommitdiff
path: root/kernel/process.s
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-04-13 21:07:02 +0200
committerAnton Kling <anton@kling.gg>2024-04-13 21:07:02 +0200
commit92f848244796881994c1f147633123c45da219b6 (patch)
tree4ad209b6ede26b8475b7f0c6afb2382336dbbac7 /kernel/process.s
parent008b84bf5308d2f180905130653a656bfedccf8c (diff)
Kernel: Don't hard fail if the kernel can't allocate memory.
Currently this is just a improvement of error handling but it should also try to free up memory where it is possible.
Diffstat (limited to 'kernel/process.s')
-rw-r--r--kernel/process.s5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/process.s b/kernel/process.s
index ed87959..fd0462f 100644
--- a/kernel/process.s
+++ b/kernel/process.s
@@ -67,7 +67,10 @@ internal_fork:
push eax
call create_process
add esp, 0xC
-
+ cmp eax, 0
+ jnz internal_fork_ret
+ mov eax, 1
+internal_fork_ret:
pop ebp
ret
after_internal_fork: