diff options
author | Matt Johnston <matt@ucc.asn.au> | 2014-07-09 00:13:17 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2014-07-09 00:13:17 +0800 |
commit | 1ccac01cee0222be332b46d7102336465760aa11 (patch) | |
tree | b569df842f267251bdaaf6d86db621ee953b8eaa /cli-main.c | |
parent | 50a5d3756fedee5078b756a686cc24213dcfcb02 (diff) |
Make sure client exit messages don't get lost
Diffstat (limited to 'cli-main.c')
-rw-r--r-- | cli-main.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -107,9 +107,10 @@ static void cli_dropbear_exit(int exitcode, const char* format, va_list param) { /* 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 @@ static void cli_dropbear_log(int UNUSED(priority), 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) { |