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 <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2012-01-04 20:11:33 +01:00 committed by Craig Small
parent 21b5980f82
commit 7ac61b3fa1

View File

@ -689,11 +689,14 @@ int main(int argc, char *argv[])
if (option_beep) if (option_beep)
beep(); beep();
if (option_errexit) { if (option_errexit) {
mvaddstr(height - 1, 0,
_("Command exit with a non-zero status. Press a key to exit."));
refresh();
fgetc(stdin);
endwin(); endwin();
exit(8); exit(8);
} }
} }
first_screen = 0; first_screen = 0;
refresh(); refresh();
if (precise_timekeeping) { if (precise_timekeeping) {