On 2020/10/05 19:45, Bharath Rupireddy wrote:
> Hi,
>
> Autoprewarm module is using it's own SIGHUP(apw_sigterm_handler, got_sigterm) and SIGTERM(apw_sighup_handler,
got_sighup)handlers which are similar to standard signal handlers(except for a difference [1]). Isn't it good to remove
themand use standard SignalHandlerForConfigReload and SignalHandlerForShutdownRequest?
>
> Attaching the patch for the above changes.
>
> Looks like the commit[2] replaced custom handlers with standard handlers.
>
> Thoughts?
+1
The patch looks good to me.
ISTM that we can also replace StartupProcSigHupHandler() in startup.c
with SignalHandlerForConfigReload() by making the startup process use
the general shared latch instead of its own one. POC patch attached.
Thought?
Probably we can also replace sigHupHandler() in syslogger.c with
SignalHandlerForConfigReload()? This would be separate patch, though.
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION