diff --git a/process.c b/process.c index ecb4922..abb777b 100644 --- a/process.c +++ b/process.c @@ -38,9 +38,10 @@ #include #include +#include "config.h" +#include "event.h" #include "upnpglobalvars.h" #include "process.h" -#include "config.h" #include "log.h" struct child *children = NULL; @@ -100,7 +101,10 @@ process_fork(struct client_cache_s *client) client->connections++; add_process_info(pid, client); number_of_children++; - } + } else if (pid == 0) + event_module.fini(); + else + DPRINTF(E_FATAL, L_GENERAL, "Fork() failed: %s\n", strerror(errno)); return pid; }