Singnals code (not just win32 specific)

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "pgsql-hackers-win32" <pgsql-hackers-win32(at)postgresql(dot)org>
Cc: "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Singnals code (not just win32 specific)
Date: 2004-01-22 09:54:10
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE1715AD@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-hackers-win32

Hello!

The backend signals code today uses pqsignal() instead of signal() at
all places. But it uses kill() and sigsetmask() (through the macro
PG_SETMASK) directly.

I propose to change this to pqkill() and pqsigsetmask(). In pqsignal.h,
these would be #define:d back to kill() and setsigmask() for the normal
method, but would be functions on win32.

The other option is to provide our own kill() function and not rename,
but that could cause problems if we ever link against a runtime library
that provides kill() (say, the MS libraries) - we need to have our own
version of kill called. And overriding "standard library" functions by
linking in a function with the same name seems a bit kludgy to me.

While this should have no effect on the functionality on non-win32
backends, it does affect the code in places that are not win32-local.

Would a patch to change kill() to pqkill() be accepted? If not, do you
have a preference on another way to tackle the issue?

//Magnus

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2004-01-22 11:03:45 Re: cache control?
Previous Message mitani 2004-01-22 08:27:00 Abstract for my replication system

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Jan Wieck 2004-01-22 13:34:35 Re: Singnals code (not just win32 specific)
Previous Message Claudio Natoli 2004-01-20 12:42:37 Re: Win32 signals code, take two