From rfg@tristatelogic.com  Mon Aug 11 10:32:51 2008
Return-Path: <rfg@tristatelogic.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 47BDD106566C
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 11 Aug 2008 10:32:51 +0000 (UTC)
	(envelope-from rfg@tristatelogic.com)
Received: from segfault-outgoing-helo.tristatelogic.com (112.171-60-66-fuji-dsl.static.surewest.net [66.60.171.112])
	by mx1.freebsd.org (Postfix) with ESMTP id 2C4358FC0A
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 11 Aug 2008 10:32:51 +0000 (UTC)
	(envelope-from rfg@tristatelogic.com)
Received: by segfault.tristatelogic.com (Postfix, from userid 1237)
	id B2765BDC53; Mon, 11 Aug 2008 03:32:50 -0700 (PDT)
Message-Id: <20080811103250.B2765BDC53@segfault.tristatelogic.com>
Date: Mon, 11 Aug 2008 03:32:50 -0700 (PDT)
From: Ronald F.Guilmette <rfg@tristatelogic.com>
Reply-To: Ronald F.Guilmette <rfg@tristatelogic.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Exit status of nc(1) is not documented
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         126451
>Category:       docs
>Synopsis:       Exit status of nc(1) is not documented
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    delphij
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 11 10:40:01 UTC 2008
>Closed-Date:    Mon Aug 03 18:47:07 UTC 2009
>Last-Modified:  Mon Aug  3 18:50:03 UTC 2009
>Originator:     Ronald F. Guilmette
>Release:        FreeBSD 7.0-RELEASE i386
>Organization:
Infinite Monkeys & Co. LLC
>Environment:
System: FreeBSD 7.0-RELEASE
>Description:
	The man page for nc(1) fails to document the possible exit stati
	of the program.
>How-To-Repeat:
	man 1 nc
>Fix:
	Add an EXIT STATUS section to the man page for nc(1).

	The exit status seems to be 0 if all goes well, or else 1 if any
	of the following errors occurs: (a) hostname given on the command
	line does not resolve or (b) connection is refused by the remote
	host or (c) connection to remote host times out before connection
	is established or (d) -l option used with privledged portno (<1024)
	when nc is executed by an unprivledged user or (e) -l option used,
	but hostname does not correspond to any IP address associated with
	any local IP interface.

	There are probably man other conditions that could be associated
	with a non-zero exit status.  Ideally, they should all be listed
	in the man page.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-doc->delphij 
Responsible-Changed-By: delphij 
Responsible-Changed-When: Tue Aug 12 21:55:54 UTC 2008 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=126451 
State-Changed-From-To: open->patched 
State-Changed-By: delphij 
State-Changed-When: Fri May 29 07:18:39 UTC 2009 
State-Changed-Why:  
I have added a "default" EXIT STATUS section for now.  It 
would be probably better if we teach nc(1) about sysexits(3) 
instead of enumerating everything in the manpage. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=126451 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/126451: commit references a PR
Date: Fri, 29 May 2009 07:18:40 +0000 (UTC)

 Author: delphij
 Date: Fri May 29 07:18:31 2009
 New Revision: 193021
 URL: http://svn.freebsd.org/changeset/base/193021
 
 Log:
   Add an EXIT STATUS section to the manual page.  Currently, nc(1)
   does not follow sysexits(3), and returns 1 for all error cases.
   
   PR:		docs/126451
 
 Modified:
   head/contrib/netcat/nc.1
 
 Modified: head/contrib/netcat/nc.1
 ==============================================================================
 --- head/contrib/netcat/nc.1	Fri May 29 06:57:45 2009	(r193020)
 +++ head/contrib/netcat/nc.1	Fri May 29 07:18:31 2009	(r193021)
 @@ -445,6 +445,8 @@ The same example again, this time enabli
  if the proxy requires it:
  .Pp
  .Dl $ nc -x10.2.3.4:8080 -Xconnect -Pruser host.example.com 42
 +.Sh EXIT STATUS
 +.Ex -std
  .Sh SEE ALSO
  .Xr cat 1 ,
  .Xr ssh 1 ,
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: delphij 
State-Changed-When: Mon Aug 3 18:46:35 UTC 2009 
State-Changed-Why:  
I've merged the change back to RELENG_6 and RELENG_7. 

Thanks for your submission! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=126451 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/126451: commit references a PR
Date: Mon,  3 Aug 2009 18:43:38 +0000 (UTC)

 Author: delphij
 Date: Mon Aug  3 18:43:26 2009
 New Revision: 196051
 URL: http://svn.freebsd.org/changeset/base/196051
 
 Log:
   MFC r193021:
   
   Add an EXIT STATUS section to the manual page. Currently, nc(1)
   does not follow sysexits(3), and returns 1 for all error cases.
   
   PR:	docs/126451
 
 Modified:
   stable/7/contrib/netcat/   (props changed)
   stable/7/contrib/netcat/nc.1
 
 Modified: stable/7/contrib/netcat/nc.1
 ==============================================================================
 --- stable/7/contrib/netcat/nc.1	Mon Aug  3 09:58:46 2009	(r196050)
 +++ stable/7/contrib/netcat/nc.1	Mon Aug  3 18:43:26 2009	(r196051)
 @@ -433,6 +433,8 @@ The same example again, this time enabli
  if the proxy requires it:
  .Pp
  .Dl $ nc -x10.2.3.4:8080 -Xconnect -Pruser host.example.com 42
 +.Sh EXIT STATUS
 +.Ex -std
  .Sh SEE ALSO
  .Xr cat 1 ,
  .Xr ssh 1
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/126451: commit references a PR
Date: Mon,  3 Aug 2009 18:45:02 +0000 (UTC)

 Author: delphij
 Date: Mon Aug  3 18:44:42 2009
 New Revision: 196052
 URL: http://svn.freebsd.org/changeset/base/196052
 
 Log:
   MFC r193021:
   
   Add an EXIT STATUS section to the manual page. Currently, nc(1)
   does not follow sysexits(3), and returns 1 for all error cases.
   
   PR:	docs/126451
 
 Modified:
   stable/6/contrib/netcat/   (props changed)
   stable/6/contrib/netcat/nc.1
 
 Modified: stable/6/contrib/netcat/nc.1
 ==============================================================================
 --- stable/6/contrib/netcat/nc.1	Mon Aug  3 18:43:26 2009	(r196051)
 +++ stable/6/contrib/netcat/nc.1	Mon Aug  3 18:44:42 2009	(r196052)
 @@ -433,6 +433,8 @@ The same example again, this time enabli
  if the proxy requires it:
  .Pp
  .Dl $ nc -x10.2.3.4:8080 -Xconnect -Pruser host.example.com 42
 +.Sh EXIT STATUS
 +.Ex -std
  .Sh SEE ALSO
  .Xr cat 1 ,
  .Xr ssh 1
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
