summaryrefslogtreecommitdiff
path: root/src/user/app/init/init.c
diff options
context:
space:
mode:
authordzwdz2022-09-02 14:44:52 +0200
committerdzwdz2022-09-02 17:58:47 +0200
commitc16d956c0dd3d69748f7208e09bb69a6df8c6483 (patch)
tree38089f4b9e7fb153aa817e25340b7107f7cdf795 /src/user/app/init/init.c
parent41a15bd16806261d66d55bbb85034553cd58361e (diff)
kernel/proc: introduce child ids for telling children apart
Diffstat (limited to 'src/user/app/init/init.c')
-rw-r--r--src/user/app/init/init.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/user/app/init/init.c b/src/user/app/init/init.c
index b97b483..04380a6 100644
--- a/src/user/app/init/init.c
+++ b/src/user/app/init/init.c
@@ -83,9 +83,11 @@ int main(void) {
}
close(killswitch_pipe[1]);
- if (fork()) {
+ long cid = fork();
+ if (cid > 0) {
/* used to trigger a kernel bug
* 7c96f9c03502e0c60f23f4c550d12a629f3b3daf */
+ printf("main at cid %u\n", cid);
_syscall_await();
exit(1);
}