https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212162

            Bug ID: 212162
           Summary: netcat (nc) does not close TCP stream / exit after end
                    of input stream
           Product: Base System
           Version: 10.3-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: [email protected]
          Reporter: [email protected]

To reproduce, use two terminals. In the first, execute:
$ nc -l 2222

In the second terminal, execute:
$ echo "hi" | nc localhost 2222

This command will hang.


My expectation is that nc will terminate once the end of the input stream is
reached.

Contrast with the behaviour of socat, which seems correct. Try this command:
$ echo "hi" | socat - TCP:localhost:2222

Both listener and sender processes exit.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to