|
From: | Evgeny Grin |
Subject: | Re: [libmicrohttpd] Using MHD_stop_daemon with signal() or elsewhere? |
Date: | Mon, 24 Jan 2022 21:18:04 +0300 |
User-agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 |
Hi Gavin,Using graceful closure is one of the vital thing for correct implementation of any application. Of course you *must* call MHD_stop_daemon() as it stops MHD threads, free memory, closes sockets, and does other cleanups.
Not calling this function is like allocating memory without deallocating.If your application is designed to work as systemd daemon, you must handle SIGTERM signal to properly close/free all resources before final exit.
-- Evgeny On 24.01.2022 19:00, Gavin Henry wrote:
Hi all, Just running some valgrind and libasan things and seeing some leaks as I'm not using MHD_stop_daemon at all. Should I be concerned here as any killing of my project is via Ctrl-C or systemd via packaging. What are others doing with MHD_stop_daemon()? Thanks.
OpenPGP_signature
Description: OpenPGP digital signature
[Prev in Thread] | Current Thread | [Next in Thread] |