Re: Preventing abort() and exit() calls in libpq

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: Michael Paquier <michael@paquier.xyz>, Jacob Champion <pchampion@vmware.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>, Daniel Gustafsson <daniel@yesql.se>
Date: 2021-06-30T22:29:11Z
Lists: pgsql-hackers

Attachments

I wrote:
> Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:
>> Could we set this rule up a little bit differently so that it is only 
>> run when the library is built.
>> Right now, make world on a built tree makes 17 calls to this "nm" line, 
>> and make check-world calls it 81 times.  I think once would be enough. ;-)

> Hmm, didn't realize that would happen.  Will see what can be done.

Looks like we'd have to make use of a dummy stamp-file, more or less
as attached.  Any objections?

			regards, tom lane

Commits

  1. Further restrict the scope of no-exit()-in-libpq test.

  2. Improve build-time check that libpq doesn't call exit().

  3. Fix portability fallout from commit dc227eb82.

  4. Add a build-time check that libpq doesn't call exit() or abort().