From nobody Fri May 10 02:52:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VbD2T3rmdz5KcbX; Fri, 10 May 2024 02:52:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VbD2T3M3Sz4Vkt; Fri, 10 May 2024 02:52:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715309569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p/QMHVaKxlqOVpiX7dqOyV8LSnx+lznS98YYqfdLt6g=; b=sFK50dPnBBZGRdHw+8lGbKW5c+jglg+Ar45n3Ae0O/7+izQ/eSKw0N4DrgnwmvBu64QLes iHLx7rclnh6doOyZcVtFpVkELt/5IYTUnpQcXDH//L07eXElluJQ5lnrnfC9LlzBTUiVZx ptRf/ibM6nIYD1LnSbflctK8q9auRxfg4PJAAQAmDVxXhs8/6znpg6logRpC9LvtVNOL9u B0bs9huDn6JAprZlgQ/9VFpKR0rRJ9FsgYt5I+Wl4cDTZC8c903IcJ7+81cJiShb43RG02 CnQ/M0hPd7GIahzJBINqxd1NUzsMnCKS77x9eHAOgmUJbPizl7FIDkkGvUZgjQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715309569; a=rsa-sha256; cv=none; b=MigJeYgZWe8fL+DjLPQlTzDWDzYkXbM+DpXK/SCOYn1QQKGRQgYkGzagUpjEqsuSE5mu1/ FAsqNuSHqlWR3p7O6Ce5nE8V9wp/goxkhJ3HUEVK6cl5n8NM5bUwEXTFZH8Sa7y0XqCVvy 5u6ItQgJhGmZriXmwXNxseML6Cz/0dSsDzipOaq6zK/M4/kpEg3VsrmR5fN47NjND5DhAi itA35/5mb3U7K+Dtnfw/jhJgyWTn0X+W/z3VfH1XlmmBeBkUrF9/FofRBvtNkaPGKDyoZQ IHF+M8BWgVXtnT9AStVCH3TZz+ydchGhf0iqdFlBjJbz3BcZscAivAkYB4Py6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715309569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p/QMHVaKxlqOVpiX7dqOyV8LSnx+lznS98YYqfdLt6g=; b=RR1e3YEKsxHUGunL5CjYq2DfaXY7R5qcYY2Z9DHbKrPwDziAD44OKQWFhyuSfjMu/EUrc8 HJKgr9/Vms+s0cxnuO4158OjWcqeQJPNQEXhAZC8jeS2Hvxlu0wYNRxIkWd2+GQff8WKwc 47NXF+w6df3KIAogKfRez/8Lb/Cdf1ntopc/I3esA8RZtW/JcMK1VRAsg9JQrdtoHdiL+q RxnDkA/7NsCtPE79Fwh5rVrUBkMc9255/PyAsmY7a+5G3SLeqBkJIC1eU20tf7fsPg5pFh 9y9VcSZjhw66h8HD3NeGUvOZKV4rPWsTiTs9XBxbGbeimHMW6X2bDUR/oqWN0Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VbD2T2yQdzK12; Fri, 10 May 2024 02:52:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44A2qnQH017924; Fri, 10 May 2024 02:52:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44A2qn3N017921; Fri, 10 May 2024 02:52:49 GMT (envelope-from git) Date: Fri, 10 May 2024 02:52:49 GMT Message-Id: <202405100252.44A2qn3N017921@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 5ccaab1797e5 - main - sysexits: Tidy deprecated header and manual List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5ccaab1797e5bdc404f2299ebaec1265547a4744 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5ccaab1797e5bdc404f2299ebaec1265547a4744 commit 5ccaab1797e5bdc404f2299ebaec1265547a4744 Author: Alexander Ziaee AuthorDate: 2024-05-10 02:43:39 +0000 Commit: Warner Losh CommitDate: 2024-05-10 02:50:48 +0000 sysexits: Tidy deprecated header and manual was deprecated in the base system in a1432b4 for FreeBSD 8.0 and is retained only for backwards compatibility. Make that clear, since sysexits(3) suggested using it since it was in style(9) prior to this. MFC after: 1 week Co-authored-by: imp Fixes: a1432b4 Reviewed by: imp, pauamma (previous version) Pull Request https://github.com/freebsd/freebsd-src/pull/1195 --- include/sysexits.h | 7 ++++--- share/man/man3/sysexits.3 | 43 ++++++++++++++++++------------------------- 2 files changed, 22 insertions(+), 28 deletions(-) diff --git a/include/sysexits.h b/include/sysexits.h index f7247cc80080..3b24e131c647 100644 --- a/include/sysexits.h +++ b/include/sysexits.h @@ -35,9 +35,10 @@ /* * SYSEXITS.H -- Exit status codes for system programs. * - * This include file attempts to categorize possible error - * exit statuses for system programs, notably delivermail - * and the Berkeley network. + * This include file attempts to categorize error exit statuses + * for system programs, notably sendmail. These values exist only + * for interface compatibility, and are deprecated for FreeBSD + * base software. * * Error numbers begin at EX__BASE to reduce the possibility of * clashing with other exit statuses that random programs may diff --git a/share/man/man3/sysexits.3 b/share/man/man3/sysexits.3 index ef736192e439..62f79b286a16 100644 --- a/share/man/man3/sysexits.3 +++ b/share/man/man3/sysexits.3 @@ -1,7 +1,7 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause .\" -.\" Copyright (c) 1996 Joerg Wunsch -.\" -.\" All rights reserved. +.\" Copyright (c) 1996 Joerg Wunsch. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -23,27 +23,20 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" " -.Dd January 21, 2010 +.Dd May 9, 2024 .Dt SYSEXITS 3 .Os .Sh NAME .Nm sysexits -.Nd preferable exit codes for programs +.Nd legacy exit status codes for system programs .Sh SYNOPSIS .In sysexits.h .Sh DESCRIPTION -According to -.Xr style 9 , -it is not a good practice to call -.Xr exit 3 -with arbitrary values to indicate a failure condition when ending -a program. -Instead, the pre-defined exit codes from -.Nm -should be used, so the caller of the process can get a rough -estimation about the failure class without looking up the source code. -.Pp +Some commands attempt to describe the nature of a failure condition +by using these pre-defined exit codes. +This interface has been deprecated and is retained only for compatibility. +Its use is discouraged. +.Sh ERRORS The successful exit is always indicated by a status of 0, or .Sy EX_OK . Error numbers begin at @@ -112,8 +105,7 @@ The remote system returned something that was during a protocol exchange. .It Sy EX_NOPERM Pq 77 You did not have sufficient permission to perform the operation. -This -is not intended for file system problems, which should use +This is not intended for file system problems, which should use .Sy EX_NOINPUT or .Sy EX_CANTCREAT , @@ -131,12 +123,13 @@ parenthesis for easy reference. .Sh HISTORY The .Nm -file appeared somewhere after -.Bx 4.3 . +file first appeared in +.Bx 4 . .Sh AUTHORS This manual page was written by -.An J\(:org Wunsch -after the comments in -.In sysexits.h . +.An J\(:org Wunsch . .Sh BUGS -The choice of an appropriate exit value is often ambiguous. +.Bl -tag -width 0 -compact +.It This interface is not portable. +.It The choice of an appropriate exit value is often ambiguous. +.El