From owner-freebsd-doc@FreeBSD.ORG Tue Apr 8 02:50:04 2008 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 667B81065673 for ; Tue, 8 Apr 2008 02:50:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 556F38FC29 for ; Tue, 8 Apr 2008 02:50:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m382o4el030634 for ; Tue, 8 Apr 2008 02:50:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m382o45J030633; Tue, 8 Apr 2008 02:50:04 GMT (envelope-from gnats) Date: Tue, 8 Apr 2008 02:50:04 GMT Message-Id: <200804080250.m382o45J030633@freefall.freebsd.org> To: freebsd-doc@FreeBSD.org From: "Ben Kaduk" Cc: Subject: Re: docs/122470: [patch] exit status on fetch(1) manual page X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Ben Kaduk List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Apr 2008 02:50:04 -0000 The following reply was made to PR docs/122470; it has been noted by GNATS. From: "Ben Kaduk" To: "Jaakko Heinonen" Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: docs/122470: [patch] exit status on fetch(1) manual page Date: Mon, 7 Apr 2008 22:24:12 -0400 Hello, On 4/5/08, Jaakko Heinonen wrote: [snip] > fetch(1) manual page states that fetch(1) exits with status zero or one: > > EXIT STATUS > The fetch command returns zero on success, or one on failure. If multi- > ple URLs are listed on the command line, fetch will attempt to retrieve > each one of them in turn, and will return zero only if they were all suc- > cessfully retrieved. > > However it's possible that it exits with status other than zero or one: > > $ fetch -h foo > usage: fetch [-146AFMPRUadlmnpqrsv] [-N netrc] [-o outputfile] > [-S bytes] [-B bytes] [-T seconds] [-w seconds] > [-h host -f file [-c dir] | URL ...] > $ echo $? > 64 > It seems that fetch(1) can also return EX_USAGE when it is not invoked as it is expecting; this macro is defined to be 64 in /usr/include/sysexits.h We might as well change the man page to say ``EX_USAGE is returned when .Nm is not invoked properly.'' -Ben Kaduk