Page MenuHomeFreeBSD

D27176.diff
No OneTemporary

D27176.diff

Index: share/man/man3/sysexits.3
===================================================================
--- share/man/man3/sysexits.3
+++ share/man/man3/sysexits.3
@@ -26,26 +26,33 @@
.\" $FreeBSD$
.\"
.\" "
-.Dd January 21, 2010
+.Dd November 11, 2020
.Dt SYSEXITS 3
.Os
.Sh NAME
.Nm sysexits
-.Nd preferable exit codes for programs
+.Nd exit codes for 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
+.Ss Use of sysexits exit codes is discouraged
+A few programs exit with the following non-portable error codes.
+Do not use them.
+They should be considered deprecated and not used in new code.
+There are a couple of reasons for it:
+.Bl -dash
+.It
+The choice of an appropriate exit value is often ambiguous.
+.It
+The
.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
+error codes are not portable.
+.It
+A message printed out to the
+.Xr stderr
+explaining the error is usually better from a user experience perspective.
+.El
+.Ss Exit values
The successful exit is always indicated by a status of 0, or
.Sy EX_OK .
Error numbers begin at
@@ -140,5 +147,3 @@
.An J\(:org Wunsch
after the comments in
.In sysexits.h .
-.Sh BUGS
-The choice of an appropriate exit value is often ambiguous.

File Metadata

Mime Type
text/plain
Expires
Sat, May 16, 1:06 AM (16 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33105013
Default Alt Text
D27176.diff (1 KB)

Event Timeline