Re: [PATCHES] postmaster.pid

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Andrew Dunstan" <andrew(at)dunslane(dot)net>
Cc: "Magnus Hagander" <mha(at)sollentuna(dot)net>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-hackers-win32(at)postgresql(dot)org>, "PostgreSQL-patches" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [PATCHES] postmaster.pid
Date: 2004-08-26 14:59:53
Message-ID: E7F85A1B5FF8D44C8A1AF6885BC9A0E41A78DB@ratbert.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers-win32 pgsql-patches

> -----Original Message-----
> From: Andrew Dunstan [mailto:andrew(at)dunslane(dot)net]
> Sent: 26 August 2004 15:43
> To: Dave Page
> Cc: Magnus Hagander; Tom Lane;
> pgsql-hackers-win32(at)postgresql(dot)org; PostgreSQL-patches
> Subject: Re: [PATCHES] [pgsql-hackers-win32] postmaster.pid
>
>
> Should we (if only for the sake of completeness) make the
> converse one-byte change in port/win32/signal.c?
>
> It says:
>
> void
> pg_queue_signal(int signum)
> {
> if (signum >= PG_SIGNAL_COUNT || signum < 0)
> return;
> ...
>
> ISTM we should not ever queue any event for signal 0.

That was my original intention, however Magnus thought it best just to
let it be queued and subsequently ignored by the backend - thinking
about it 15 minutes later I can't for the life of me think why that's
any better...

Regards, Dave.

Index: backend/port/win32/signal.c
===================================================================
RCS file:
/projects/cvsroot/pgsql-server/src/backend/port/win32/signal.c,v
retrieving revision 1.4
diff -u -r1.4 signal.c
--- backend/port/win32/signal.c 24 Jun 2004 21:02:42 -0000 1.4
+++ backend/port/win32/signal.c 26 Aug 2004 14:58:25 -0000
@@ -162,7 +162,7 @@
void
pg_queue_signal(int signum)
{
- if (signum >= PG_SIGNAL_COUNT || signum < 0)
+ if (signum >= PG_SIGNAL_COUNT || signum <= 0)
return;

EnterCriticalSection(&pg_signal_crit_sec);
Index: port/kill.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/port/kill.c,v
retrieving revision 1.2
diff -u -r1.2 kill.c
--- port/kill.c 24 Jun 2004 18:53:48 -0000 1.2
+++ port/kill.c 26 Aug 2004 14:58:28 -0000
@@ -26,7 +26,7 @@
BYTE sigRet = 0;
DWORD bytes;

- if (sig >= PG_SIGNAL_COUNT || sig <= 0)
+ if (sig >= PG_SIGNAL_COUNT || sig < 0)
{
errno = EINVAL;
return -1;

Responses

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Magnus Hagander 2004-08-26 15:07:18 Re: [PATCHES] postmaster.pid
Previous Message Bruce Momjian 2004-08-26 14:56:53 Re: Service startup delay

Browse pgsql-patches by date

  From Date Subject
Next Message Magnus Hagander 2004-08-26 15:07:18 Re: [PATCHES] postmaster.pid
Previous Message Bruce Momjian 2004-08-26 14:56:53 Re: Service startup delay