Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
LSH
lsh
Commits
dd6be796
Commit
dd6be796
authored
Jul 13, 2012
by
Niels Möller
Browse files
tcpconnect: Ignore SIGPIPE. Fixes to diagnostic printouts.
parent
afa72761
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
dd6be796
2012-07-13 Niels Möller <nisse@lysator.liu.se>
* src/testsuite/tcpconnect.c (main): Ignore SIGPIPE. Fixes to
diagnostic printouts.
* src/lsh.c (main_argp_parser): Pass on --hostkey-algorithm and
new option --kex-algorithm to lsh-transport.
...
...
src/testsuite/tcpconnect.c
View file @
dd6be796
...
...
@@ -33,6 +33,8 @@
#include <unistd.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
...
...
@@ -182,6 +184,9 @@ main (int argc, char **argv)
if
(
connect
(
fd
,
p
->
ai_addr
,
p
->
ai_addrlen
)
>=
0
)
break
;
if
(
verbose
)
fprintf
(
stderr
,
"Connect failed: %s
\n
"
,
strerror
(
errno
));
close
(
fd
);
fd
=
-
1
;
}
...
...
@@ -229,6 +234,8 @@ main (int argc, char **argv)
else
if
(
fcntl
(
fd
,
F_SETFL
,
flags
|
1
|
O_NONBLOCK
)
<
0
)
werror
(
"fcntl F_SETFL failed: %s
\n
"
,
strerror
(
errno
));
signal
(
SIGPIPE
,
SIG_IGN
);
buf_size
=
buf_pos
=
0
;
seen_stdin_eof
=
seen_remote_eof
=
0
;
...
...
@@ -362,7 +369,7 @@ main (int argc, char **argv)
close
(
fd
);
if
(
verbose
)
fprintf
(
stderr
,
"[Connection closed]"
);
fprintf
(
stderr
,
"[Connection closed]
\n
"
);
return
EXIT_SUCCESS
;
}
Write
Preview
Supports
Markdown
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