Sergey Bugaev, le sam. 15 avril 2023 10:34:46 +0300, a ecrit: > If you really want to deallocate and reset the current reply port, you > need to do the dance like sigreturn does: > > mach_port_t reply_port = THREAD_GETMEM (THREAD_SELF, reply_port); > THREAD_SETMEM (THREAD_SELF, MACH_PORT_DEAD); > (void) __mach_port_mod_refs (... reply_port ...); > THREAD_SETMEM (THREAD_SELF, MACH_PORT_NULL);
Ok. > Maybe there should be a build step that checks that nothing unexpected > gets pulled in, and that nothing system-dependent is ever accessed > other than through dl-sysdep. That can be best, yes. Samuel