diff options
author | Mark Wong <markwkm@gmail.com> | 2008-08-28 18:05:50 -0700 |
---|---|---|
committer | Mark Wong <markwkm@gmail.com> | 2008-08-28 18:05:50 -0700 |
commit | 5c1459f29690c1fc4e5a061400725bed1776b4c2 (patch) | |
tree | 629516dbed68d6b4da00945f5d157ecc54324708 /pg_top.c | |
parent | 43c155bc9bf3f9c16f23369c6d7bcfacd38528fe (diff) |
Disallow 'kill' and 'renice' when connected to a remote database system.
Diffstat (limited to 'pg_top.c')
-rw-r--r-- | pg_top.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -1127,6 +1127,13 @@ Usage: %s [-ITWbcinqru] [-x x] [-s x] [-o field] [-z username]\n\ #ifdef ENABLE_KILL case CMD_kill: /* kill program */ + if (mode_remote == 1) + { + new_message(MT_standout, "Cannot kill when accessing a remote database."); + putchar('\r'); + no_command = Yes; + break; + } new_message(0, "kill "); if (readline(tempbuf2, sizeof(tempbuf2), No) > 0) { @@ -1144,6 +1151,13 @@ Usage: %s [-ITWbcinqru] [-x x] [-s x] [-o field] [-z username]\n\ break; case CMD_renice: /* renice program */ + if (mode_remote == 1) + { + new_message(MT_standout, "Cannot renice when accessing a remote database."); + putchar('\r'); + no_command = Yes; + break; + } new_message(0, "renice "); if (readline(tempbuf2, sizeof(tempbuf2), No) > 0) { |