From: Sami Kerola Date: Wed, 4 Jan 2012 19:11:33 +0000 (+0100) Subject: watch: halt screen at exit on error X-Git-Tag: v3.3.2~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7ac61b3fa112e242bb5d52bac35ad82fb5f85f11;p=procps-ng watch: halt screen at exit on error This change allows user to see what was the last message before exit on error, and when where the last update. Signed-off-by: Sami Kerola --- diff --git a/watch.c b/watch.c index a6ad22e7..769ce3cf 100644 --- a/watch.c +++ b/watch.c @@ -689,11 +689,14 @@ int main(int argc, char *argv[]) if (option_beep) beep(); if (option_errexit) { + mvaddstr(height - 1, 0, + _("Command exit with a non-zero status. Press a key to exit.")); + refresh(); + fgetc(stdin); endwin(); exit(8); } } - first_screen = 0; refresh(); if (precise_timekeeping) {