remove_unnecessary_code_in_psql_watch.patch
text/x-diff
Filename: remove_unnecessary_code_in_psql_watch.patch
Type: text/x-diff
Part: 0
Patch
Format: unified
| File | + | − |
|---|---|---|
| src/bin/psql/command.c | 2 | 13 |
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c
index 5c906e4806..c03e47744e 100644
--- a/src/bin/psql/command.c
+++ b/src/bin/psql/command.c
@@ -5312,20 +5312,10 @@ do_watch(PQExpBuffer query_buf, double sleep, int iter, int min_rows)
continue;
#ifdef WIN32
-
- /*
- * Set up cancellation of 'watch' via SIGINT. We redo this each time
- * through the loop since it's conceivable something inside
- * PSQLexecWatch could change sigint_interrupt_jmp.
- */
- if (sigsetjmp(sigint_interrupt_jmp, 1) != 0)
- break;
-
/*
- * Enable 'watch' cancellations and wait a while before running the
- * query again. Break the sleep into short intervals (at most 1s).
+ * Wait a while before running the query again. Break the sleep into
+ * short intervals (at most 1s).
*/
- sigint_interrupt_enabled = true;
for (long i = sleep_ms; i > 0;)
{
long s = Min(i, 1000L);
@@ -5335,7 +5325,6 @@ do_watch(PQExpBuffer query_buf, double sleep, int iter, int min_rows)
break;
i -= s;
}
- sigint_interrupt_enabled = false;
#else
/* sigwait() will handle SIGINT. */
sigprocmask(SIG_BLOCK, &sigint, NULL);