> Hi Gavin, Hi Evgeny,
> Using graceful closure is one of the vital thing for correct > implementation of any application. Understood. > Of course you *must* call MHD_stop_daemon() as it stops MHD threads, > free memory, closes sockets, and does other cleanups. Thanks. I understand closing the sockets, but the OS/kernel will do all the rest no? I need mhd always on until the application quits. What happens after that the OS/kernel will sort. > Not calling this function is like allocating memory without deallocating. I don't think that's the same at all. MHD doesn't perform badly nor does my application leak memory if I don't call MHD_stop_daemon(). It restarts just fine. > If your application is designed to work as systemd daemon, you must > handle SIGTERM signal to properly close/free all resources before final > exit. Is there some guidance on that systemd requirement? Will Google. Thanks. -- Kind Regards, Gavin Henry. https://sentrypeer.org