Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matt Johnston
dropbear
Commits
1ccac01c
Commit
1ccac01c
authored
Jul 09, 2014
by
Matt Johnston
Browse files
Make sure client exit messages don't get lost
parent
50a5d375
Changes
2
Hide whitespace changes
Inline
Side-by-side
cli-main.c
View file @
1ccac01c
...
...
@@ -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
)
{
...
...
common-channel.c
View file @
1ccac01c
...
...
@@ -574,14 +574,16 @@ static void remove_channel(struct Channel * channel) {
}
/* close the FDs in case they haven't been done
* yet (they might have been shutdown etc) */
TRACE
((
"CLOSE writefd %d"
,
channel
->
writefd
))
close
(
channel
->
writefd
);
TRACE
((
"CLOSE readfd %d"
,
channel
->
readfd
))
close
(
channel
->
readfd
);
TRACE
((
"CLOSE errfd %d"
,
channel
->
errfd
))
close
(
channel
->
errfd
);
if
(
IS_DROPBEAR_SERVER
||
(
channel
->
writefd
!=
STDOUT_FILENO
))
{
/* close the FDs in case they haven't been done
* yet (they might have been shutdown etc) */
TRACE
((
"CLOSE writefd %d"
,
channel
->
writefd
))
close
(
channel
->
writefd
);
TRACE
((
"CLOSE readfd %d"
,
channel
->
readfd
))
close
(
channel
->
readfd
);
TRACE
((
"CLOSE errfd %d"
,
channel
->
errfd
))
close
(
channel
->
errfd
);
}
if
(
!
channel
->
close_handler_done
&&
channel
->
type
->
closehandler
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment