this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Notify LKM when closing with dup2; Update LKM

+10 -1
+10 -1
src/kernel/emulation/linux/unistd/dup2.c
··· 3 3 #include "../errno.h" 4 4 #include <linux-syscalls/linux.h> 5 5 #include "../duct_errno.h" 6 + #include "../mach/lkm.h" 7 + #include <lkm/api.h> 6 8 7 9 long sys_dup2(int fd_from, int fd_to) 8 10 { 9 11 int ret; 10 - 12 + 13 + if (fd_from != fd_to) { 14 + struct closing_descriptor_args args = { 15 + .fd = fd_to, 16 + }; 17 + lkm_call(NR_closing_descriptor, &args); 18 + } 19 + 11 20 #if defined(__NR_dup2) 12 21 ret = LINUX_SYSCALL2(__NR_dup2, fd_from, fd_to); 13 22 #else