Im using postgresql 10.1 on Mac.
I have a trouble in terminating a background worker using SIGTERM. In my project, im creating a new background worker using RegisterBackgroundWorker(). i have included a test_function, as a signal handler for SIGTERM. No other signal handlers are defined.
pqsignal(SIGTERM, test_function)
when i issue pkill -15 postgres
, i see that the handler is being called twice. Why does it happen? Am i missing anything??