Fix bug with initializing pool_password in daemon mode.
Patch from Nicolas Thauvin.
To: pgpool-hackers@pgfoundry.org
Date: Tue, 17 May 2011 17:08:56 +0200
------------------------------------------------------------------------
When in daemon mode, connection hangs when using md5 authentication
method. The child process in charge of the client goes into an infinite
loop in pool_get_passwd() while trying to read the pool_passwd file.
The cause of the problem comes from the daemonize() function that closes
all file descriptors starting from 3, including the file descriptor of
the pool_passwd file. When pgpool gets to pool_get_passwd, the null
checks on the passwd_fd variable fail because the variable was not reset
to a NULL value.