job control: sessions and process groups

This commit is contained in:
Matheus
2024-05-01 21:42:38 -03:00
parent 1f848fe596
commit 05049a091f
13 changed files with 484 additions and 18 deletions
+2 -1
View File
@@ -3,8 +3,8 @@
#include <errno.h>
#include <kernel/file.h>
#include <kernel/interrupt.h>
#include <kernel/jobctl.h>
#include <logging.h>
syscallret_t syscall_fork(context_t *ctx) {
syscallret_t ret = {
.ret = -1,
@@ -53,6 +53,7 @@ syscallret_t syscall_fork(context_t *ctx) {
CTX_RET(&nthread->context) = 0;
CTX_ERRNO(&nthread->context) = 0;
jobctl_addproc(proc, nproc);
ret.ret = nproc->pid;