[pgpool-committers: 9490] pgpool: Install system exit callback only after initialization of share
Muhammad Usama
m.usama at gmail.com
Mon Jul 24 03:00:26 JST 2023
Install system exit callback only after initialization of shared memory.
When the on-exit callback gets called because of a failure to acquire
shared memory. The cleanup function can produce a segfault while accessing
process_info, that lives in shared memory.
Although we can also fix this by bailing out from the exit callback when
process_info is NULL but installing the function after successful initialization
of shared memory is a better approach as the rest of the system always assumes
the process_info can never be NULL, and also, there is nothing to
clean up before child processes are spawned.
Branch
------
V4_4_STABLE
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=2cbc61e064fe8053fced5a1efddfc455978f54c0
Modified Files
--------------
src/main/pgpool_main.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
More information about the pgpool-committers
mailing list