diff options
author | Ian Moffett <ian@osmora.org> | 2024-08-12 22:05:00 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-08-12 22:13:46 -0400 |
commit | 8970ddd9be6c013ff8cae2b1872f65348c7ded54 (patch) | |
tree | 8fa83fde9cd319ce6ff67b2af052e1a9d7e0d8e9 /sys/kern/kern_exec.c | |
parent | 30cb24fbc5700771208dddb9e5f42d0ae5d7ff38 (diff) |
kernel: Add initial support for signals
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r-- | sys/kern/kern_exec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index ceb08f6..863f4ae 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -32,6 +32,7 @@ #include <sys/errno.h> #include <sys/proc.h> #include <sys/sched.h> +#include <sys/signal.h> #include <vm/vm.h> #include <vm/map.h> #include <vm/physmem.h> @@ -97,9 +98,10 @@ execve(struct proc *td, const struct execve_args *args) prog.envp = args->envp; stack_top = td->stack_base + (PROC_STACK_SIZE - 1); - /* Setup registers and stack */ + /* Setup registers, signals and stack */ md_td_stackinit(td, (void *)(stack_top + VM_HIGHER_HALF), &prog); setregs(td, &prog, stack_top); + signals_init(td); /* Done, reset flags and start the user thread */ td->flags &= ~PROC_EXEC; |