[pgpool-committers: 9495] 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. Also, there is nothing to
clean up before child processes are spawned.
Branch
------
V4_1_STABLE
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=f8d67eeb4c3fc39886230b6314f2fe67b2393d6a
Modified Files
--------------
src/main/pgpool_main.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
More information about the pgpool-committers
mailing list