From c16d956c0dd3d69748f7208e09bb69a6df8c6483 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Fri, 2 Sep 2022 14:44:52 +0200 Subject: kernel/proc: introduce child ids for telling children apart --- src/user/app/init/init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/user/app/init') 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); } -- cgit v1.2.3