Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tY9MK-004fKv-7w for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Jan 2025 19:47:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tY9MI-00GSrM-Re for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Jan 2025 19:47:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tY9MI-00GSrE-IR for pgsql-hackers@lists.postgresql.org; Wed, 15 Jan 2025 19:47:23 +0000 Received: from mail-io1-xd31.google.com ([2607:f8b0:4864:20::d31]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tY9MH-000aPl-2v for pgsql-hackers@lists.postgresql.org; Wed, 15 Jan 2025 19:47:22 +0000 Received: by mail-io1-xd31.google.com with SMTP id ca18e2360f4ac-844eb33827eso4696639f.2 for ; Wed, 15 Jan 2025 11:47:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736970440; x=1737575240; darn=lists.postgresql.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=s9iEs4z2Q5viAItVyWnkmOqFzGvhL1Miize0D6zh+T8=; b=Fb0sFN049kR9tQ5LeR+4mCPB0cmMX60VCbOgPkxd/sdGAyspAFo+y+x2CALUT6C4Yu MyUybY3EJZFVrStGuPlKJz/a1fA9oEUqPiwIWsEnONoj/jNtsyGHRnIJM/2l5esE3m13 s95Hi0egYv9sxSUeewPKph1gGopot6QUi/s3ztqs+a32UDe9ddv7zkElRAZTruGxE/zu aRecHQehUVZhuAAnxECrp7tTOQ5OP3vh4b+Vd/Q0Icr/fvyoFTr8fJ39t1xXYqzG96sX TBMQYWpmDm6lPj6501RWaF6MdtNMGAlMKVpppQ5Al0t1JeD+bUu1hV90RrgnxueLjTv7 cn4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736970440; x=1737575240; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=s9iEs4z2Q5viAItVyWnkmOqFzGvhL1Miize0D6zh+T8=; b=mMVx9hgu96oaiiIs/qyvMBq5cPcZzaz9IcSL4aHXB9ZDhp/Gp0SrCZrmK3kPZNRCSw YPayOOWfkj3hLFYZ6T72Fb3+8ggpVuHh+uuiY5X+03pKaVn2OAUGdHzso5SHwnPaemuO qTVunbG7aMugxsuVNHMAUf3qY1ZrFKD2PdCSW4thzpwOQ1mWqVA6XWAqiU4JhYVoJHnn xaiK5+sX3y9h1JEvP4QhClRSqEZc6ISZ+IhSC8y5cqAVtC9oHuxvxbSpEKCYVLUibbfY slJADoFxMBevqpFoSi+s2S420yl2b4HuIEy6uKs2K8nGb+ZFf4+Fex1Z4AmGgyPWa8RM N+TA== X-Forwarded-Encrypted: i=1; AJvYcCXxTmBjQLTDG7hPRPnkjijsuE0mqe9H221sBmdHRH18yurnxEyJ4DXVKxDxxY/TkkL9XnHIfpdM+fV6MueP@lists.postgresql.org X-Gm-Message-State: AOJu0Yzgj2eUH245aWv+DcWSu7r86wBK+ph66FjG8RlzbkFdhvehiWe8 +SlSJ8kLeUcZZiOy+IGXXPmRfUnWjk23KQ5Mj1Ae922E/06zY6SD X-Gm-Gg: ASbGnctO0ASjLhE2/M6tLjSU3h0zNjBtM96rAqw2u0owW2btGEmqNxb3iRE8cBQPvsX ukPvXoE77ryycrnV5sXi2ClbIyj2qISsG+rhTeEjQWRSSEYw4E8ZhHv8DsMx58pBxoh0hNVsnu0 B3lWrnykdvVlYHqNF6d67mYJ1zQErpPVXC2aSwz9awV8uqFbek8OnnA6qgHWfRCTe61vToZpxTa SM1CIoL45M2cxVYEz7uXARG7p8OksQ7kdT+keEwDaxJiX7dRrhF5MuwgQUD0SLdT6Lb0jT5PYJY TDYy1/iUq2007LEYAZFPIzuPL+ZQLe0OuWoU3ZuJdBG3+1I= X-Google-Smtp-Source: AGHT+IG75O9U67Q7CHGoejlMmHiO4MemfnZwx154AlTNdTi4PBXIcWH62eKrtPmEAnQvUA3/r8O3hw== X-Received: by 2002:a05:6602:650d:b0:84f:41e2:8087 with SMTP id ca18e2360f4ac-84f41e28145mr1129586939f.8.1736970440537; Wed, 15 Jan 2025 11:47:20 -0800 (PST) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4ea1b76b2d8sm4240727173.144.2025.01.15.11.47.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jan 2025 11:47:20 -0800 (PST) Date: Wed, 15 Jan 2025 13:47:18 -0600 From: Nathan Bossart To: Thomas Munro Cc: Tom Lane , Fujii Masao , Andy Fan , pgsql-hackers@lists.postgresql.org Subject: Re: convert libpgport's pqsignal() to a void function Message-ID: References: <1164438.1736910166@sss.pgh.pa.us> <1171432.1736914085@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Jan 16, 2025 at 08:21:08AM +1300, Thomas Munro wrote: > On Thu, Jan 16, 2025 at 8:15 AM Nathan Bossart wrote: >> On Tue, Jan 14, 2025 at 11:08:05PM -0500, Tom Lane wrote: >> > I wonder why we redefine those values? >> >> I wondered the same. Those redefines have been there since commit 5049196, >> but I haven't been able to find any real discussion in the archives about >> it. Maybe I will bug Magnus about it sometime, in case he happens to >> remember the reason. > > My guess would be: perhaps some ancient version of MinGW didn't define > them? They're defined by MinGW and native signal.h now and they have > the same values, so we should remove them I think. Okay. If nothing else, it'd be interesting to see what the buildfarm thinks. > Assertion failed: 0, file ../src/port/pqsignal.c, line 147 > > Could be due to calling native signal() with a signal number other > than the 6 values required to work by the C standard? Looking closer, that probably makes more sense than my SIG_ERR redefinition theory. If that assertion is getting hit, that means signal() _is_ returning SIG_ERR (either the system one or our redefined version), and it looks like it's pretty common to use -1 for SIG_ERR. That'd only affect Windows frontend programs, but it still sounds scary. I'll try getting more details about the error with some custom cfbot runs. -- nathan