Fix hung up in pcp_exit_handler of pcp child main.
authorTatsuo Ishii <ishii@sraoss.co.jp>
Sun, 17 Sep 2023 11:45:46 +0000 (20:45 +0900)
committerTatsuo Ishii <ishii@sraoss.co.jp>
Sun, 17 Sep 2023 11:45:46 +0000 (20:45 +0900)
commit2ee501190928f149f67dcb537855071091e27caa
treefc9dd6f0e06640e1d35301f4f3f1a977a183185f
parentfb0800e3f0211ba833ca05cf506387e4d2a279b8
Fix hung up in pcp_exit_handler of pcp child main.

pcp_exit_handler is responsible for waiting for exiting pcp child
process. I suspect it is hung up in the wait loop in regression test
001.

https://www.pgpool.net/pipermail/pgpool-hackers/2023-September/004397.html

So I changed it so that it uses waitpid(2) with WNOHANG option.
src/pcp_con/pcp_child.c