diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-10-30 23:11:27 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-10-30 23:11:27 +0000 |
commit | 44e8a968e33f04974edc8ac9f184d009b036bbb7 (patch) | |
tree | db4ddd8e717a63555273096289f4fa56f7a817ed /src/bin/psql/mainloop.c | |
parent | 80559fa9e9657ecfdb92a210971b8d0aa6e82e39 (diff) |
Invent a new, more thread-safe version of PQrequestCancel, called PQcancel.
Use this new function in psql. Implement query cancellation in psql for
Windows. Code by Magnus Hagander, documentation and minor editorialization
by Tom Lane.
Diffstat (limited to 'src/bin/psql/mainloop.c')
-rw-r--r-- | src/bin/psql/mainloop.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/bin/psql/mainloop.c b/src/bin/psql/mainloop.c index c555710a347..d9f3395b1a2 100644 --- a/src/bin/psql/mainloop.c +++ b/src/bin/psql/mainloop.c @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2004, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/mainloop.c,v 1.64 2004/08/29 05:06:54 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/psql/mainloop.c,v 1.65 2004/10/30 23:10:50 tgl Exp $ */ #include "postgres_fe.h" #include "mainloop.h" @@ -121,7 +121,10 @@ MainLoop(FILE *source) * ready */ pqsignal(SIGINT, handle_sigint); /* control-C => cancel */ -#endif /* not WIN32 */ + +#else /* WIN32 */ + setup_cancel_handler(); +#endif fflush(stdout); |