Greetings,

I am developing a FastCGI application in C++. I would like to perform 
some clean-up when Apache is shut down. On Linux I can just wait for 
SIGTERM, do the clean-up and exit. What is the equivalent procedure on 
Windows?

I've tried waiting for a WM_QUIT or WM_CLOSE using GetMessage and I've 
tried waiting for the HANDLE extracted from the "_FCGI_SHUTDOWN_EVENT_" 
environment variable using WaitForSingleObject. Neither worked (the 
functions did not return and my process got killed).

I'm using Apache/2.4.20 (Win64) OpenSSL/1.0.2g mod_fcgid/2.3.9a 
(binaries from Apache Haus) on Windows 10.

Thank you for your help,
Balázs Kádár

Reply via email to