summaryrefslogtreecommitdiff
path: root/src/init
diff options
context:
space:
mode:
authordzwdz2021-08-18 17:14:22 +0200
committerdzwdz2021-08-18 17:14:22 +0200
commit5ec560b7a0b5cea60bbda61a48fcc4e9866ce6b1 (patch)
tree41df495c0b5aa7a4e3cdb70857fa2604952c4213 /src/init
parentc9d4cf8572f8cbb0024bfa9802c25473f90e9d60 (diff)
store the processes as a tree instead of a list
I'm about to need that for waits(). There's no single list of processes for simplicity's sake, but the search will now be even slower and it might even introduce a potential vuln! How fun! Someone could override stuff in .bss with random values. I'll either make gcc check if it hasn't gone past the end of the stack, or turn this into a non recursive function.
Diffstat (limited to 'src/init')
-rw-r--r--src/init/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/init/main.c b/src/init/main.c
index 00f8f31..a59ce9c 100644
--- a/src/init/main.c
+++ b/src/init/main.c
@@ -19,6 +19,11 @@ int main() {
multipageify("I cross pages. "),
sizeof("I cross pages. ") - 1);
+ _syscall_fork();
+
+ _syscall_debuglog("fork ",
+ sizeof("fork ") - 1);
+
_syscall_exit("bye from init! ",
sizeof("bye from init! ") - 1);
}