Win32 signals cleanup. Patch by Magnus Hagander, with input from Claudio
Neil Conway <neilc@samurai.com>
Win32 signals cleanup. Patch by Magnus Hagander, with input from Claudio
Natoli and Bruce Momjian (and some cosmetic fixes from Neil Conway).
Changes:
- remove duplicate signal definitions from pqsignal.h
- replace pqkill() with kill() and redefine kill() in Win32
- use ereport() in place of fprintf() in some error handling in
pqsignal.c
- export pg_queue_signal() and make use of it where necessary
- add a console control handler for Ctrl-C and similar handling
on Win32
- do WaitForSingleObjectEx() in CHECK_FOR_INTERRUPTS() on Win32;
query cancelling should now work on Win32
- various other fixes and cleanups
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/async.c | modified | +2 −3 |
| src/backend/libpq/pqsignal.c | modified | +28 −16 |
| src/backend/port/sysv_sema.c | modified | +2 −4 |
| src/backend/port/sysv_shmem.c | modified | +2 −3 |
| src/backend/postmaster/postmaster.c | modified | +49 −16 |
| src/backend/storage/ipc/pmsignal.c | modified | +2 −3 |
| src/backend/storage/lmgr/proc.c | modified | +2 −3 |
| src/backend/utils/init/miscinit.c | modified | +2 −3 |
| src/include/libpq/pqsignal.h | modified | +9 −110 |
| src/include/miscadmin.h | modified | +11 −1 |
| src/include/port/win32.h | modified | +9 −1 |