this repo has no description
1
fork

Configure Feed

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

At fork, the parent now waits for child for re-open /dev/mach

+8 -16
+1 -1
src/duct/src/CMakeLists.txt
··· 12 12 13 13 SET(duct_sources 14 14 commpage.c libnotify.c numcpus.c 15 - CRGetCrashLogMessage.c acl.c bootstrap.c dns_sd.c 15 + CRGetCrashLogMessage.c acl.c dns_sd.c 16 16 sa_dst_compare.c os_log.c) 17 17 18 18 set(DYLIB_INSTALL_NAME "/usr/lib/system/libsystem_duct.dylib")
-15
src/duct/src/bootstrap.c
··· 1 - #if 0 2 - int bootstrap_parent() 3 - { 4 - return 0; 5 - } 6 - 7 - void bootstrap_init(void) 8 - { 9 - } 10 - #endif 11 - 12 - void _libxpc_initializer(void) 13 - { 14 - } 15 -
+7
src/kernel/libsyscall/mach/mach_init.c
··· 61 61 #include <machine/cpu_capabilities.h> 62 62 #include <stdbool.h> 63 63 #include "externs.h" 64 + #include <lkm/api.h> 64 65 65 66 mach_port_t bootstrap_port = MACH_PORT_NULL; 66 67 mach_port_t mach_task_self_ = MACH_PORT_NULL; ··· 84 85 85 86 extern void _pthread_set_self(void *); 86 87 extern void _init_cpu_capabilities(void); 88 + extern void lkm_call(int nr, void* arg); 87 89 88 90 kern_return_t 89 91 host_page_size(__unused host_t host, vm_size_t *out_page_size) ··· 113 115 { 114 116 mach_init_doit(); 115 117 return 0; 118 + } 119 + 120 + void _mach_fork_parent(void) 121 + { 122 + lkm_call(NR_fork_wait_for_child, NULL); 116 123 } 117 124 118 125 void