Win32 signals patch #2

Started by Magnus Haganderover 22 years ago2 messagespatches
Jump to latest
#1Magnus Hagander
magnus@hagander.net

Hello!

Here's step #2 in win32 signals handling, containing the following:

1) Per discussion with Bruce, reverts the change from kill() to pqkill()
on all platforms. Instead, #define away kill() to pqkill() in
port/win32.h, and just use kill() directly on unix platforms. Similar
changes for pqsigsetmask, except they are all local to pqsignal.h.

2) Implements pqselect() in similar ways. This function appears just as
select() to the user. Internally, it runs a loop where it polls for
signals once / second. This allows the backend to actually shut down,
since we can deliver signals to both postmaster and statistics
processes. Ordinary backends cannot yet be shut down, since they don't
use select, but a blocking recv() instead. I'll get to those soon...

//Magnus

Attachments:

select.capplication/octet-stream; name=select.cDownload
win32_signals_2.patchapplication/octet-stream; name=win32_signals_2.patchDownload+31-32
#2Magnus Hagander
magnus@hagander.net
In reply to: Magnus Hagander (#1)
Re: Win32 signals patch #2

Ehh, scratch that. That file had pqselect call itself..

Here is an updated version of select.c for backend/port/win32. The patch
stays the same.

//mha

Show quoted text

-----Original Message-----
From: Magnus Hagander
Sent: den 2 februari 2004 22:35
To: pgsql-hackers-win32
Cc: pgsql-patches@postgresql.org
Subject: [pgsql-hackers-win32] Win32 signals patch #2

Hello!

Here's step #2 in win32 signals handling, containing the following:

1) Per discussion with Bruce, reverts the change from kill()
to pqkill()
on all platforms. Instead, #define away kill() to pqkill() in
port/win32.h, and just use kill() directly on unix platforms. Similar
changes for pqsigsetmask, except they are all local to pqsignal.h.

2) Implements pqselect() in similar ways. This function appears just as
select() to the user. Internally, it runs a loop where it polls for
signals once / second. This allows the backend to actually shut down,
since we can deliver signals to both postmaster and statistics
processes. Ordinary backends cannot yet be shut down, since they don't
use select, but a blocking recv() instead. I'll get to those soon...

//Magnus

Attachments:

select.capplication/octet-stream; name=select.cDownload