aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2017-10-01 15:17:10 -0700
committerAndres Freund <andres@anarazel.de>2017-10-01 15:24:58 -0700
commit2e83db3ad2da9b073af9ae12916f0b71cf698e1e (patch)
tree8269b3ba939836c9cfee92793157446995ac1e6b /src
parent5a632a213d43c30940de3328286172c52730a01d (diff)
downloadpostgresql-2e83db3ad2da9b073af9ae12916f0b71cf698e1e.tar.gz
postgresql-2e83db3ad2da9b073af9ae12916f0b71cf698e1e.zip
Allow pg_ctl kill to send SIGKILL.
Previously that was disallowed out of an abundance of caution. Providing KILL support however is helpful to make the 013_crash_restart.pl test portable, and there's no actual issue with allowing it. SIGABRT, which has similar consequences except it also dumps core, was already allowed. Author: Andres Freund Discussion: https://postgr.es/m/45d42d41-6145-9be1-7261-84acf6d9e344@2ndQuadrant.com
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_ctl/pg_ctl.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c
index 4e02c4cea1a..0893d0d26f1 100644
--- a/src/bin/pg_ctl/pg_ctl.c
+++ b/src/bin/pg_ctl/pg_ctl.c
@@ -1903,7 +1903,7 @@ do_help(void)
printf(_(" immediate quit without complete shutdown; will lead to recovery on restart\n"));
printf(_("\nAllowed signal names for kill:\n"));
- printf(" ABRT HUP INT QUIT TERM USR1 USR2\n");
+ printf(" ABRT HUP INT KILL QUIT TERM USR1 USR2\n");
#ifdef WIN32
printf(_("\nOptions for register and unregister:\n"));
@@ -1961,11 +1961,8 @@ set_sig(char *signame)
sig = SIGQUIT;
else if (strcmp(signame, "ABRT") == 0)
sig = SIGABRT;
-#if 0
- /* probably should NOT provide SIGKILL */
else if (strcmp(signame, "KILL") == 0)
sig = SIGKILL;
-#endif
else if (strcmp(signame, "TERM") == 0)
sig = SIGTERM;
else if (strcmp(signame, "USR1") == 0)