Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lz1ys-0002rF-OS for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Jul 2021 19:04:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lz1yr-0000Yt-Kk for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Jul 2021 19:04:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lz1yr-0000Yl-CN for pgsql-hackers@lists.postgresql.org; Thu, 01 Jul 2021 19:04:09 +0000 Received: from forward5-smtp.messagingengine.com ([66.111.4.239]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lz1yn-0002KF-Eb for pgsql-hackers@postgresql.org; Thu, 01 Jul 2021 19:04:08 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailforward.nyi.internal (Postfix) with ESMTP id ED69119401A0; Thu, 1 Jul 2021 15:04:01 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 01 Jul 2021 15:04:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=/txeXszaI7f+Tf9/W60hYgVyw1k8n+eemAxhPr1Xd 4c=; b=Mi2NeBZkWo5OQwdpESAwgigoKiuG3nOlS6J4LUW6AK2DbKjHNNym4Fv7g IF6U7Qo+bYWgVk17IfgvyO9CVFtTKsYWP1piQQpknBzO5EJvwroJE3ktm1rWWpdl zb11ZO6WAixgYQ+HORkowYBdY7zT90xLnm090Td/GDMi56xOB3GXmqnSZANiC4pJ FntwgvzL5Hn+PlZ2n4nlQloUFd2jqGBmEQSsvEKMe4QislXUmrJ3aWRnZhp+IOvC rqvhDV959mVQAFc0HRyCPCyL94ElalwdwNRpm2p5IGHkEBjJ52fT0AOh/bjf9AD4 iieSeDAyEM49UNOS7xqdR0sl34GgA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeeiiedgudefudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefuvfhfhffkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvghnth gvrhhprhhishgvuggsrdgtohhmqeenucggtffrrghtthgvrhhnpeelveehheeuieduieet iedtkeeuteelfeetjeffieffudegvdffvdfftdeivdeukeenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrrdgvihhsvghnthhrrghu thesvghnthgvrhhprhhishgvuggsrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 1 Jul 2021 15:04:00 -0400 (EDT) Subject: Re: Preventing abort() and exit() calls in libpq To: Tom Lane Cc: Jacob Champion , "daniel@yesql.se" , "pgsql-hackers@postgresql.org" , "michael@paquier.xyz" References: <3128896.1624742969@sss.pgh.pa.us> <18eda75d-af6d-3fc0-03b6-607eff9f392a@enterprisedb.com> <622907.1625084114@sss.pgh.pa.us> <630837.1625092151@sss.pgh.pa.us> <67ddcb26f82acaffb26c59b7d8e4cd75399b2cd3.camel@vmware.com> <9d35a4ac-2c75-cb44-95ab-61d69deb072e@enterprisedb.com> <745046.1625163264@sss.pgh.pa.us> From: Peter Eisentraut Message-ID: Date: Thu, 1 Jul 2021 21:03:58 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <745046.1625163264@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 01.07.21 20:14, Tom Lane wrote: > The variant of this I'd been thinking of was > > $(shlib): $(OBJS) | $(SHLIB_PREREQS) > $(LINK.shared) -o $@ $(OBJS) $(LDFLAGS) $(LDFLAGS_SL) $(SHLIB_LINK) > +ifneq (,$(SHLIB_EXTRA_ACTION)) > + $(SHLIB_EXTRA_ACTION) > +endif > > (and similarly in several other places); then libpq's Makefile > could set SHLIB_EXTRA_ACTION to the desired thing. Right, that looks sensible. (Maybe the ifneq isn't actually necessary, since if the variable is not set, nothing would happen.) > The problem then is, what happens when the extra action fails? > Without .DELETE_ON_ERROR, the shlib is still there and the next > make run will think everything's good. Right. .DELETE_ON_ERROR is already set in Makefile.global, so it's not necessary to set it again.