summaryrefslogtreecommitdiff
path: root/sys/kern/kern_spawn.c
AgeCommit message (Collapse)Author
42 hourskernel: spawn: Deprecate SPAWN_WAITIan Moffett
Deprecate SPAWN_WAIT in favor of waitpid() Signed-off-by: Ian Moffett <ian@osmora.org>
42 hourskernel: spawn: Add waitpid()Ian Moffett
Add waitpid() in preparation of deprecating SPAWN_WAIT. Signed-off-by: Ian Moffett <ian@osmora.org>
42 hourskernel: spawn: Continue if procp NULLIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
47 hourskernel: Move 'g_nthreads' to kern_accnt.cIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
47 hourskernel: proc: Decrement proc count on exitIan Moffett
Previously, our process counter was monotonic (wuh oh!). We want to be sure that it decrements when a process exits. - Rename nthreads to g_nthreads as a global - Atomically increment on enter and decrement on exit Signed-off-by: Ian Moffett <ian@osmora.org>
10 dayskernel: proc: Add cred per processaIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-06-13kernel: spawn: Add argv + stub envp argumentsIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-06-13kernel: Only free thread data on exitIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-06-09kernel: spawn: Wait on both PROC_SLEEP + PROC_ZOMBIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-06-09kernel: spawn: Set PROC_WAITED before td enqueueIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-06-09kernel: spawn: Ensure pathbuf is zeroedIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-06-09kernel: spawn: Improve wait sleep handlingIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-06-08kernel: spawn: Return process exit status on failIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-31kernel: spawn: Fix fmt argIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-31kernel: spawn: Add support for SPAWN_WAIT flagIan Moffett
Add SPAWN_WAIT flag that causes spawn() to wait until the child process completes. Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-31kernel: proc: `spawn_data' -> `data'Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-31kernel: spawn: Add missing includeIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-28kernel: exit: Handle killings of kernel threadsIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-16kernel: spawn: Exit on execve() failureIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-16kernel: spawn: Add proper spawn impl + SYS_spawnIan Moffett
This commit introduces a more complete spawn implementation as well as the SYS_spawn syscall and a libc interface. Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-15kernel: proc: Do not introduce fork()Ian Moffett
Simplicity is divine, fork() may be powerful but is no longer simple. It became a thing in the late 70s during the early days of UNIX when computing was simple, when CPUs were only 16-bits, MMUs were not prevalent and RAM was only 512 KB. However it isn't 1971 anymore, process management, CPUs and memory architecture has advanced significantly since. This commit ceases work on the fork() syscall as implementing it would only introduce unnecessary complexity, security issues, hefty processing overhead and would perpetuate what should now be considered legacy. The current best alternative would be providing a form of process spawning as well as a mechanism to wait for the child process to complete. Signed-off-by: Ian Moffett <ian@osmora.org>