看板 FB_doc 關於我們 聯絡資訊
The following reply was made to PR docs/122470; it has been noted by GNATS. From: "Ben Kaduk" <minimarmot@gmail.com> To: "Jaakko Heinonen" <jh@saunalahti.fi> 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 <jh@saunalahti.fi> 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 _______________________________________________ freebsd-doc@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-doc To unsubscribe, send any mail to "freebsd-doc-unsubscribe@freebsd.org"