Hi bluhm,
Very sorry for my remiss! Updated, thanks!
Index: netcat.c
===
RCS file: /cvs/src/usr.bin/nc/netcat.c,v
retrieving revision 1.192
diff -u -p -r1.192 netcat.c
--- netcat.c10 Aug 2018 17:15:22 - 1.192
+++
On Thu, Sep 06, 2018 at 06:27:15PM +0800, Nan Xiao wrote:
> @@ -564,8 +564,11 @@ main(int argc, char *argv[])
> }
> /* Allow only one connection at a time, but stay alive. */
> for (;;) {
> - if (family != AF_UNIX)
> +
Hi bluhm,
Thanks for your reply! I think your method is better, and I update the
patch:
Index: netcat.c
===
RCS file: /cvs/src/usr.bin/nc/netcat.c,v
retrieving revision 1.192
diff -u -p -r1.192 netcat.c
--- netcat.c10 Aug 2018
On Tue, Sep 04, 2018 at 01:01:38PM +0800, Nan Xiao wrote:
> Before netcat program exits, it will check whether s is -1, and close
> socket if s is not -1:
>
> if (s != -1)
> close(s);
>
> The following patch fixes the issue that netcat will close socket twice
> if it works as
Ping tech@,
Could anyone spare a minute to check this patch? I think it is indeed a bug.
On 9/4/2018 1:01 PM, Nan Xiao wrote:
> Hi tech@,
>
> Before netcat program exits, it will check whether s is -1, and close
> socket if s is not -1:
>
> if (s != -1)
> close(s);
>
> The
Hi tech@,
Before netcat program exits, it will check whether s is -1, and close
socket if s is not -1:
if (s != -1)
close(s);
The following patch fixes the issue that netcat will close socket twice
if it works as a server:
Index: netcat.c