diff options
author | dzwdz | 2023-06-04 20:43:51 +0200 |
---|---|---|
committer | dzwdz | 2023-06-04 20:43:51 +0200 |
commit | 78cb60b644538a33e0479f25393d6c861e3605f8 (patch) | |
tree | 15d310b2bba5cce086633c025080155ca36e7c43 /src/kernel/syscalls.c | |
parent | 8fd4943b2721696f86783d22dd2e8d593a22a766 (diff) |
kernel: rework /proc/ and process IDs
I'm yet to write proper docs but the TL;DR is:
Mounting /proc/ creates a new pid namespace. You're still visible in the old
namespace with your old pid, but your children won't be. You see your own pid
as 1. Current pids of children will be preserved, pids will be allocated starting
from the highest one of your children.
Diffstat (limited to 'src/kernel/syscalls.c')
-rw-r--r-- | src/kernel/syscalls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c index 0810720..589098b 100644 --- a/src/kernel/syscalls.c +++ b/src/kernel/syscalls.c @@ -74,7 +74,7 @@ long _sys_fork(int flags, hid_t __user *fs_front) { pcpy_to(proc_cur, fs_front, &hid, sizeof hid); } } - SYSCALL_RETURN(child->cid); + SYSCALL_RETURN(proc_ns_id(proc_cur->pns, child)); } hid_t _sys_open(const char __user *path, long len, int flags) { |