From f06e79525a57ccbf54ae5d0b673cd904ca978d67 Mon Sep 17 00:00:00 2001 From: Neil Conway Date: Sun, 8 Feb 2004 22:28:57 +0000 Subject: 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 --- src/backend/commands/async.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/backend/commands/async.c') diff --git a/src/backend/commands/async.c b/src/backend/commands/async.c index cbc7ee5146e..333380c22ac 100644 --- a/src/backend/commands/async.c +++ b/src/backend/commands/async.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/async.c,v 1.108 2004/01/27 00:45:26 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/commands/async.c,v 1.109 2004/02/08 22:28:56 neilc Exp $ * *------------------------------------------------------------------------- */ @@ -83,7 +83,6 @@ #include "commands/async.h" #include "libpq/libpq.h" #include "libpq/pqformat.h" -#include "libpq/pqsignal.h" #include "miscadmin.h" #include "storage/ipc.h" #include "tcop/tcopprot.h" @@ -498,7 +497,7 @@ AtCommit_Notify(void) * for some reason. It's OK to send the signal first, because * the other guy can't read pg_listener until we unlock it. */ - if (pqkill(listenerPID, SIGUSR2) < 0) + if (kill(listenerPID, SIGUSR2) < 0) { /* * Get rid of pg_listener entry if it refers to a PID that -- cgit v1.2.3