Skip to content

Commit e9bc044

Browse files
Provide error hint on exit() check when building libpq
Commit dc227eb introduced a restriction on libpq that no functions which invoke exit() are allowed to be called. This was further refined and fixed in e45b0df and 2f7bae2 and 7922595. While this is well documented in the Makefile, the error message emitted when the check failed was terse, without hints for new developers without prior context. This adds an error hint to assist new developers onboarding to postgres. Author: Rachel Heaton <rheaton@vmware.com> Co-authored-by: Jacob Champion <pchampion@vmware.com> Discussion: https://postgr.es/m/CADJcwiVL20955HCNzDqz9BEDr6A77pz6-nac5sbZVvhAEMijLg@mail.gmail.com
1 parent ce27c89 commit e9bc044

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/interfaces/libpq/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ backend_src = $(top_srcdir)/src/backend
115115
libpq-refs-stamp: $(shlib)
116116
ifneq ($(enable_coverage), yes)
117117
ifeq (,$(filter aix solaris,$(PORTNAME)))
118-
! nm -A -u $< 2>/dev/null | grep -v __cxa_atexit | grep exit
118+
@if nm -a -u $< 2>/dev/null | grep -v __cxa_atexit | grep exit; then \
119+
echo 'libpq must not be calling any function which invokes exit'; exit 1; \
120+
fi
119121
endif
120122
endif
121123
touch $@

0 commit comments

Comments
 (0)