aboutsummaryrefslogtreecommitdiff
path: root/src/bin/psql/command.c
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2022-07-24 09:32:34 +1200
committerThomas Munro <tmunro@postgresql.org>2022-07-24 09:32:34 +1200
commitfb12becdfb89e35f3f56768cefe1a837f0afafaf (patch)
treeeea26473ddbbd0284db10c287ac3a0a7c6167a22 /src/bin/psql/command.c
parent86e5eb4f58a276870fbd29e3711b36e4a4280979 (diff)
downloadpostgresql-fb12becdfb89e35f3f56768cefe1a837f0afafaf.tar.gz
postgresql-fb12becdfb89e35f3f56768cefe1a837f0afafaf.zip
Remove dead handling for pre-POSIX sigwait().
sigwait() is in SUSv2 and all targeted Unix systems have it. An earlier pre-standard function prototype existed on some older systems, but we no longer need a workaround for that. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Reviewed-by: Greg Stark <stark@mit.edu> Reviewed-by: Robert Haas <robertmhaas@gmail.com> Discussion: https://postgr.es/m/CA+hUKGJ3LHeP9w5Fgzdr4G8AnEtJ=z=p6hGDEm4qYGEUX5B6fQ@mail.gmail.com
Diffstat (limited to 'src/bin/psql/command.c')
-rw-r--r--src/bin/psql/command.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c
index 0955142215a..cac98804ab5 100644
--- a/src/bin/psql/command.c
+++ b/src/bin/psql/command.c
@@ -4953,7 +4953,7 @@ do_watch(PQExpBuffer query_buf, double sleep)
FILE *pagerpipe = NULL;
int title_len;
int res = 0;
-#ifdef HAVE_POSIX_DECL_SIGWAIT
+#ifndef WIN32
sigset_t sigalrm_sigchld_sigint;
sigset_t sigalrm_sigchld;
sigset_t sigint;
@@ -4967,7 +4967,7 @@ do_watch(PQExpBuffer query_buf, double sleep)
return false;
}
-#ifdef HAVE_POSIX_DECL_SIGWAIT
+#ifndef WIN32
sigemptyset(&sigalrm_sigchld_sigint);
sigaddset(&sigalrm_sigchld_sigint, SIGCHLD);
sigaddset(&sigalrm_sigchld_sigint, SIGALRM);
@@ -5006,7 +5006,7 @@ do_watch(PQExpBuffer query_buf, double sleep)
* PAGER environment variables, because traditional pagers probably won't
* be very useful for showing a stream of results.
*/
-#ifdef HAVE_POSIX_DECL_SIGWAIT
+#ifndef WIN32
pagerprog = getenv("PSQL_WATCH_PAGER");
#endif
if (pagerprog && myopt.topt.pager)
@@ -5077,7 +5077,7 @@ do_watch(PQExpBuffer query_buf, double sleep)
if (pagerpipe && ferror(pagerpipe))
break;
-#ifndef HAVE_POSIX_DECL_SIGWAIT
+#ifdef WIN32
/*
* Set up cancellation of 'watch' via SIGINT. We redo this each time
@@ -5158,7 +5158,7 @@ do_watch(PQExpBuffer query_buf, double sleep)
fflush(stdout);
}
-#ifdef HAVE_POSIX_DECL_SIGWAIT
+#ifndef WIN32
/* Disable the interval timer. */
memset(&interval, 0, sizeof(interval));
setitimer(ITIMER_REAL, &interval, NULL);