Mercurial > dropbear
diff cli-main.c @ 938:c88dce72f6d2
Make sure client exit messages don't get lost
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 09 Jul 2014 00:13:17 +0800 |
parents | aa689d140928 |
children | 5daedffd0769 |
line wrap: on
line diff
--- a/cli-main.c Tue Jul 08 21:59:36 2014 +0800 +++ b/cli-main.c Wed Jul 09 00:13:17 2014 +0800 @@ -107,9 +107,10 @@ /* Do the cleanup first, since then the terminal will be reset */ session_cleanup(); + /* Avoid printing onwards from terminal cruft */ + fprintf(stderr, "\n"); _dropbear_log(LOG_INFO, fmtbuf, param); - exit(exitcode); } @@ -121,7 +122,7 @@ vsnprintf(printbuf, sizeof(printbuf), format, param); fprintf(stderr, "%s: %s\n", cli_opts.progname, printbuf); - + fflush(stderr); } static void exec_proxy_cmd(void *user_data_cmd) {