diff options
| author | Neil Conway | 2004-02-08 22:28:57 +0000 |
|---|---|---|
| committer | Neil Conway | 2004-02-08 22:28:57 +0000 |
| commit | f06e79525a57ccbf54ae5d0b673cd904ca978d67 (patch) | |
| tree | 88e84b43a0eaa593dffa0f454bfef23ce49cd9d2 /src/backend/storage | |
| parent | 04e82e500868c3e8582f797d7b54a44fcc750a68 (diff) | |
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
Diffstat (limited to 'src/backend/storage')
| -rw-r--r-- | src/backend/storage/ipc/pmsignal.c | 5 | ||||
| -rw-r--r-- | src/backend/storage/lmgr/proc.c | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/backend/storage/ipc/pmsignal.c b/src/backend/storage/ipc/pmsignal.c index 58eb80fef08..b0fc1aea0ff 100644 --- a/src/backend/storage/ipc/pmsignal.c +++ b/src/backend/storage/ipc/pmsignal.c @@ -8,7 +8,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/storage/ipc/pmsignal.c,v 1.12 2004/01/27 00:45:26 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/storage/ipc/pmsignal.c,v 1.13 2004/02/08 22:28:56 neilc Exp $ * *------------------------------------------------------------------------- */ @@ -20,7 +20,6 @@ #include "miscadmin.h" #include "storage/pmsignal.h" #include "storage/shmem.h" -#include "libpq/pqsignal.h" /* @@ -65,7 +64,7 @@ SendPostmasterSignal(PMSignalReason reason) /* Atomically set the proper flag */ PMSignalFlags[reason] = true; /* Send signal to postmaster */ - pqkill(PostmasterPid, SIGUSR1); + kill(PostmasterPid, SIGUSR1); } /* diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c index a3d4ad08874..f6d7c634a71 100644 --- a/src/backend/storage/lmgr/proc.c +++ b/src/backend/storage/lmgr/proc.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/storage/lmgr/proc.c,v 1.145 2004/01/27 00:45:26 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/storage/lmgr/proc.c,v 1.146 2004/02/08 22:28:56 neilc Exp $ * *------------------------------------------------------------------------- */ @@ -51,7 +51,6 @@ #include "storage/proc.h" #include "storage/sinval.h" #include "storage/spin.h" -#include "libpq/pqsignal.h" /* GUC variables */ int DeadlockTimeout = 1000; @@ -1131,7 +1130,7 @@ CheckStatementTimeout(void) { /* Time to die */ statement_timeout_active = false; - pqkill(MyProcPid, SIGINT); + kill(MyProcPid, SIGINT); } else { |
