summaryrefslogtreecommitdiff
path: root/src/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel')
-rw-r--r--src/kernel/syscalls.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c
index f41aabf..faa7ccc 100644
--- a/src/kernel/syscalls.c
+++ b/src/kernel/syscalls.c
@@ -179,7 +179,13 @@ handle_t _syscall_fs_fork2(void) {
* also there's this whole thing with handling errors here properly and
* errno
* TODO figure this out */
- if (front == 0) panic_unimplemented();
+ if (front == 0) {
+ // dumb hack
+ front = process_find_handle(process_current);
+ if (front < 0) return -1;
+ process_current->handles[front].type = HANDLE_FS_FRONT;
+ process_current->handles[0].type = HANDLE_EMPTY;
+ }
backend = kmalloc(sizeof *backend); // TODO never freed
backend->type = VFS_BACK_USER;