Commit ecf340a3 authored by Niels Möller's avatar Niels Möller

tcpconnect: Fixes for EOF logic.

parent d140f3f8
......@@ -2,6 +2,7 @@
From lsh-2.0.4 branch:
* src/testsuite/tcpconnect.c: Include netinet/in.h.
(main): Set seen_remote_eof and seen_stdin_eof flags at EOF.
2013-06-27 Niels Möller <nisse@lysator.liu.se>
......
......@@ -303,6 +303,7 @@ main (int argc, char **argv)
}
else if (res == 0)
{
seen_stdin_eof = 1;
wait_stdin_eof = 0;
if (!wait_remote_eof)
break;
......@@ -345,6 +346,7 @@ main (int argc, char **argv)
if (verbose && res < 0)
werror("read from socket failed: %s\n", strerror(errno));
seen_remote_eof = 1;
wait_remote_eof = 0;
if (!wait_stdin_eof)
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment