[Bug 294334] nc(1) doesn't print any error message when connection is refused

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 08 Apr 2026 15:42:43 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294334

            Bug ID: 294334
           Summary: nc(1) doesn't print any error message when connection
                    is refused
           Product: Base System
           Version: 15.0-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: yuri@freebsd.org

Example:

> $ telnet ollama.org 12499
> Trying 176.123.6.177...
> telnet: connect to address 176.123.6.177: Connection refused
> telnet: Unable to connect to remote host
> $ nc ollama.org 12499 
> $ echo $?
> 1
> $ 

telnet prints the correct error message, but nc doesn't. nc just fails with
exit_code=1.

-- 
You are receiving this mail because:
You are the assignee for the bug.