From 17fe7bc9c8311f7e192385e47550607e61874528 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sat, 10 Jun 2023 17:47:16 +0200 Subject: kernel: implement DUP_SEARCH (like unix's F_DUPFD) --- src/kernel/proc.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/kernel/proc.h') diff --git a/src/kernel/proc.h b/src/kernel/proc.h index bf5db69..f473124 100644 --- a/src/kernel/proc.h +++ b/src/kernel/proc.h @@ -129,10 +129,9 @@ Proc *proc_next(Proc *p, Proc *root); hid_t proc_find_free_handle(Proc *proc, hid_t start_at); Handle *proc_handle_get(Proc *, hid_t); hid_t proc_handle_init(Proc *, enum handle_type, Handle **); -hid_t proc_handle_dup(Proc *p, hid_t from, hid_t to); +hid_t proc_handle_dup(Proc *p, hid_t from, hid_t to, int flags); static inline void proc_handle_close(Proc *p, hid_t hid) { - // TODO test - proc_handle_dup(p, -1, hid); + proc_handle_dup(p, -1, hid, 0); } /* Gets a handle and removes the process' reference to it, without decreasing the refcount. -- cgit v1.2.3