Date: Sun, 21 Oct 2001 23:19:54 +0200 (CEST) From: Oliver Fromme <olli@secnetix.de> To: FreeBSD-gnats-submit@freebsd.org Cc: Oliver Fromme <olli@secnetix.de> Subject: bin/31415: install(1) is wrong about exit codes Message-ID: <200110212119.f9LLJsF88854@lurza.secnetix.de>
next in thread | raw e-mail | index | archive | help
>Number: 31415
>Category: bin
>Synopsis: install(1) is wrong about exit codes
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: doc-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Oct 21 14:20:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Oliver Fromme
>Release: FreeBSD 4.4-RELEASE i386
>Organization:
secnetix GmbH & Co KG
>Environment:
System: FreeBSD lurza.secnetix.de 4.4-RELEASE FreeBSD 4.4-RELEASE #0: Wed Oct 10 18:15:28 CEST 2001 olli@lurza.secnetix.de:/usr/obj/usr/src/sys/LURZA i386
>Description:
The install(1) manpage says:
DIAGNOSTICS
The install utility exits 0 on success, and 1 otherwise.
This is wrong; the install utility never exits 1.
Instead, it uses sysexits codes, according to the
sysexits(3) manpage.
>How-To-Repeat:
See the "diagnostics" section in the install(1) manpage.
The compare the source code in src/usr.bin/xinstall/xinstall.c.
Note the various places where err() and errx() is used.
Also, you can simply try it:
$ install -z
install: illegal option -- z
zsh: 88521 exit 64 install -z
$ install / /
install: /: Inappropriate file type or format
zsh: 88522 exit 71 install / /
>Fix:
I suggest a wording like this:
DIAGNOSTICS
The install utility exits 0 on success, and a
value > 0 according to sysexits(3) otherwise.
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200110212119.f9LLJsF88854>
