diff -r 97039494764b -r 4ed0e46aa9dc src/server/daemon/event_bsd.c --- a/src/server/daemon/event_bsd.c Fri Aug 16 16:59:05 2024 +0200 +++ b/src/server/daemon/event_bsd.c Fri Aug 16 18:09:05 2024 +0200 @@ -53,17 +53,22 @@ return NULL; } - SYS_THREAD t = systhread_start( + handler->thr = systhread_start( 0, 0, (thrstartfunc)ev_handle_events, handler); - systhread_detach(t); } return ev; } +void ev_instance_wait(EventHandler *h) { + EventHandlerLinux *ev = (EventHandlerLinux*)h; + void *ret; + pthread_join(ev->thr, &ret); +} + static volatile int ev_close = 0; void ev_instance_close(EventHandler *h) {