[pgpool-hackers: 53] Re: [pgpool-II 0000009]: dont call syslog(3) family in signal handler.

Tatsuo Ishii ishii at postgresql.org
Sat Mar 31 11:40:06 JST 2012


> Well that was a very quick and dirty look, I was thinking that perhaps
> we can use send_frontend_exits() from child_exit() to send the
> information to the parent process. But after taking the time to read
> source code it is related to the backend connection, so sorry for the noise.
> 
> So we still have to find a solution to print the "authentication timeout
> message" outside the signal handler mostly from the parent process. Do
> you have an idea on how to proceed ?

Quick loook by using "grep RETSIGTYPE" reveleas that there are number
of placess where pool_log etc. get called in a signal handler. This is
not the whole story of course. Even there's no pool_log calls, it is
possible that a function called in a signal handler calls pool_log.

I think the only solution is, pool_log does not call syslog if called
in a signal handler. However I could find a way for a function to know
if it is called within a signal handler. What about setting a global
flag at the beginning of a signal handler. When pool_log is called and
if it finds the flag being set, it does not call syslog.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp


More information about the pgpool-hackers mailing list