* [PATCH] errno.3: Add values for all errors
@ 2017-11-23 0:15 Wesley Aptekar-Cassels
[not found] ` <20171123001545.dp55g3pkdm5bzah3-8dEs2KUsCdXP0Z7Jsv878P8+0UxHXcjY@public.gmane.org>
0 siblings, 1 reply; 15+ messages in thread
From: Wesley Aptekar-Cassels @ 2017-11-23 0:15 UTC (permalink / raw)
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA
This patch documents the values of error numbers on linux. This is
something that is in the OpenBSD errno man page, which I find quite
useful.
Signed-off-by: Wesley Aptekar-Cassels <W.Aptekar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
man3/errno.3 | 243 ++++++++++++++++++++++++++++++-----------------------------
1 file changed, 122 insertions(+), 121 deletions(-)
diff --git a/man3/errno.3 b/man3/errno.3
index ff38ab256..0d6fe474e 100644
--- a/man3/errno.3
+++ b/man3/errno.3
@@ -92,222 +92,223 @@ which may be the same.
.\" Amendment 1 defines the additional error number \fBEILSEQ\fP for
.\" coding errors in multibyte or wide characters.
.\"
-Below is a list of the symbolic error names that are defined on Linux.
+Below is a list of the symbolic error names that are defined on Linux, along
+with their values.
Some of these are marked
.IR POSIX.1 ,
indicating that the name is defined by POSIX.1-2001, or
.\" FIXME This list should be updated for POSIX.1-2008
.IR C99 ,
indicating that the name is defined by C99.
-.TP 16
-.B E2BIG
+.TP 21
+.B E2BIG (7)
Argument list too long (POSIX.1).
.TP
-.B EACCES
+.B EACCES (13)
Permission denied (POSIX.1).
.TP
-.B EADDRINUSE
+.B EADDRINUSE (98)
Address already in use (POSIX.1).
.TP
-.B EADDRNOTAVAIL
+.B EADDRNOTAVAIL (99)
Address not available (POSIX.1).
.\" EADV is only an error on HURD(?)
.TP
-.B EAFNOSUPPORT
+.B EAFNOSUPPORT (97)
Address family not supported (POSIX.1).
.TP
-.B EAGAIN
+.B EAGAIN (11)
Resource temporarily unavailable (may be the same value as
.BR EWOULDBLOCK )
(POSIX.1).
.TP
-.B EALREADY
+.B EALREADY (114)
Connection already in progress (POSIX.1).
.TP
-.B EBADE
+.B EBADE (52)
Invalid exchange.
.TP
-.B EBADF
+.B EBADF (9)
Bad file descriptor (POSIX.1).
.TP
-.B EBADFD
+.B EBADFD (77)
File descriptor in bad state.
.TP
-.B EBADMSG
+.B EBADMSG (74)
Bad message (POSIX.1).
.TP
-.B EBADR
+.B EBADR (53)
Invalid request descriptor.
.TP
-.B EBADRQC
+.B EBADRQC (56)
Invalid request code.
.TP
-.B EBADSLT
+.B EBADSLT (57)
Invalid slot.
.\" EBFONT is defined but appears not to be used by kernel or glibc.
.TP
-.B EBUSY
+.B EBUSY (16)
Device or resource busy (POSIX.1).
.TP
-.B ECANCELED
+.B ECANCELED (125)
Operation canceled (POSIX.1).
.TP
-.B ECHILD
+.B ECHILD (10)
No child processes (POSIX.1).
.TP
-.B ECHRNG
+.B ECHRNG (44)
Channel number out of range.
.TP
-.B ECOMM
+.B ECOMM (70)
Communication error on send.
.TP
-.B ECONNABORTED
+.B ECONNABORTED (103)
Connection aborted (POSIX.1).
.TP
-.B ECONNREFUSED
+.B ECONNREFUSED (111)
Connection refused (POSIX.1).
.TP
-.B ECONNRESET
+.B ECONNRESET (104)
Connection reset (POSIX.1).
.TP
-.B EDEADLK
+.B EDEADLK (35)
Resource deadlock avoided (POSIX.1).
.TP
.B EDEADLOCK
Synonym for
.BR EDEADLK .
.TP
-.B EDESTADDRREQ
+.B EDESTADDRREQ (89)
Destination address required (POSIX.1).
.TP
-.B EDOM
+.B EDOM (33)
Mathematics argument out of domain of function (POSIX.1, C99).
.\" EDOTDOT is defined but appears to be unused
.TP
-.B EDQUOT
+.B EDQUOT (122)
.\" POSIX just says "Reserved"
Disk quota exceeded (POSIX.1).
.TP
-.B EEXIST
+.B EEXIST (17)
File exists (POSIX.1).
.TP
-.B EFAULT
+.B EFAULT (14)
Bad address (POSIX.1).
.TP
-.B EFBIG
+.B EFBIG (27)
File too large (POSIX.1).
.TP
-.B EHOSTDOWN
+.B EHOSTDOWN (112)
Host is down.
.TP
-.B EHOSTUNREACH
+.B EHOSTUNREACH (113)
Host is unreachable (POSIX.1).
.TP
-.B EIDRM
+.B EIDRM (43)
Identifier removed (POSIX.1).
.TP
-.B EILSEQ
+.B EILSEQ (84)
Invalid or incomplete multibyte or wide character (POSIX.1, C99).
.IP
The text shown here is the glibc error description;
in POSIX.1, this error is described as "Illegal byte sequence".
.TP
-.B EINPROGRESS
+.B EINPROGRESS (115)
Operation in progress (POSIX.1).
.TP
-.B EINTR
+.B EINTR (4)
Interrupted function call (POSIX.1); see
.BR signal (7).
.TP
-.B EINVAL
+.B EINVAL (22)
Invalid argument (POSIX.1).
.TP
-.B EIO
+.B EIO (5)
Input/output error (POSIX.1).
.TP
-.B EISCONN
+.B EISCONN (106)
Socket is connected (POSIX.1).
.TP
-.B EISDIR
+.B EISDIR (21)
Is a directory (POSIX.1).
.TP
-.B EISNAM
+.B EISNAM (120)
Is a named type file.
.TP
-.B EKEYEXPIRED
+.B EKEYEXPIRED (127)
Key has expired.
.TP
-.B EKEYREJECTED
+.B EKEYREJECTED (129)
Key was rejected by service.
.TP
-.B EKEYREVOKED
+.B EKEYREVOKED (128)
Key has been revoked.
.TP
-.B EL2HLT
+.B EL2HLT (51)
Level 2 halted.
.TP
-.B EL2NSYNC
+.B EL2NSYNC (45)
Level 2 not synchronized.
.TP
-.B EL3HLT
+.B EL3HLT (46)
Level 3 halted.
.TP
-.B EL3RST
+.B EL3RST (47)
Level 3 reset.
.TP
-.B ELIBACC
+.B ELIBACC (79)
Cannot access a needed shared library.
.TP
-.B ELIBBAD
+.B ELIBBAD (80)
Accessing a corrupted shared library.
.TP
-.B ELIBMAX
+.B ELIBMAX (82)
Attempting to link in too many shared libraries.
.TP
-.B ELIBSCN
+.B ELIBSCN (81)
\&.lib section in a.out corrupted
.TP
-.B ELIBEXEC
+.B ELIBEXEC (83)
Cannot exec a shared library directly.
.TP
-.B ELOOP
+.B ELOOP (40)
Too many levels of symbolic links (POSIX.1).
.\" ELNRNG is defined but appears to be unused
.TP
-.B EMEDIUMTYPE
+.B EMEDIUMTYPE (124)
Wrong medium type.
.TP
-.B EMFILE
+.B EMFILE (24)
Too many open files (POSIX.1).
Commonly caused by exceeding the
.BR RLIMIT_NOFILE
resource limit described in
.BR getrlimit (2).
.TP
-.B EMLINK
+.B EMLINK (31)
Too many links (POSIX.1).
.TP
-.B EMSGSIZE
+.B EMSGSIZE (90)
Message too long (POSIX.1).
.TP
-.B EMULTIHOP
+.B EMULTIHOP (72)
.\" POSIX says "Reserved"
Multihop attempted (POSIX.1).
.TP
-.B ENAMETOOLONG
+.B ENAMETOOLONG (36)
Filename too long (POSIX.1).
.\" ENAVAIL is defined, but appears not to be used
.TP
-.B ENETDOWN
+.B ENETDOWN (100)
Network is down (POSIX.1).
.TP
-.B ENETRESET
+.B ENETRESET (102)
Connection aborted by network (POSIX.1).
.TP
-.B ENETUNREACH
+.B ENETUNREACH (101)
Network unreachable (POSIX.1).
.TP
-.B ENFILE
+.B ENFILE (23)
Too many open files in system (POSIX.1).
On Linux, this is probably a result of encountering the
.IR /proc/sys/fs/file-max
@@ -315,95 +316,95 @@ limit (see
.BR proc (5)).
.\" ENOANO is defined but appears to be unused.
.TP
-.B ENOBUFS
+.B ENOBUFS (105)
No buffer space available (POSIX.1 (XSI STREAMS option)).
.\" ENOCSI is defined but appears to be unused.
.TP
-.B ENODATA
+.B ENODATA (61)
No message is available on the STREAM head read queue (POSIX.1).
.TP
-.B ENODEV
+.B ENODEV (19)
No such device (POSIX.1).
.TP
-.B ENOENT
+.B ENOENT (2)
No such file or directory (POSIX.1).
.IP
Typically, this error results when a specified pathname does not exist,
or one of the components in the directory prefix of a pathname does not exist,
or the specified pathname is a dangling symbolic link.
.TP
-.B ENOEXEC
+.B ENOEXEC (8)
Exec format error (POSIX.1).
.TP
-.B ENOKEY
+.B ENOKEY (126)
Required key not available.
.TP
-.B ENOLCK
+.B ENOLCK (37)
No locks available (POSIX.1).
.TP
-.B ENOLINK
+.B ENOLINK (67)
.\" POSIX says "Reserved"
Link has been severed (POSIX.1).
.TP
-.B ENOMEDIUM
+.B ENOMEDIUM (123)
No medium found.
.TP
-.B ENOMEM
+.B ENOMEM (12)
Not enough space (POSIX.1).
.TP
-.B ENOMSG
+.B ENOMSG (42)
No message of the desired type (POSIX.1).
.TP
-.B ENONET
+.B ENONET (64)
Machine is not on the network.
.TP
-.B ENOPKG
+.B ENOPKG (65)
Package not installed.
.TP
-.B ENOPROTOOPT
+.B ENOPROTOOPT (92)
Protocol not available (POSIX.1).
.TP
-.B ENOSPC
+.B ENOSPC (28)
No space left on device (POSIX.1).
.TP
-.B ENOSR
+.B ENOSR (63)
No STREAM resources (POSIX.1 (XSI STREAMS option)).
.TP
-.B ENOSTR
+.B ENOSTR (60)
Not a STREAM (POSIX.1 (XSI STREAMS option)).
.TP
-.B ENOSYS
+.B ENOSYS (38)
Function not implemented (POSIX.1).
.TP
-.B ENOTBLK
+.B ENOTBLK (15)
Block device required.
.TP
-.B ENOTCONN
+.B ENOTCONN (107)
The socket is not connected (POSIX.1).
.TP
-.B ENOTDIR
+.B ENOTDIR (20)
Not a directory (POSIX.1).
.TP
-.B ENOTEMPTY
+.B ENOTEMPTY (39)
Directory not empty (POSIX.1).
.\" ENOTNAM is defined but appears to be unused.
.TP
-.B ENOTSOCK
+.B ENOTSOCK (88)
Not a socket (POSIX.1).
.TP
-.B ENOTSUP
+.B ENOTSUP (95)
Operation not supported (POSIX.1).
.TP
-.B ENOTTY
+.B ENOTTY (25)
Inappropriate I/O control operation (POSIX.1).
.TP
-.B ENOTUNIQ
+.B ENOTUNIQ (76)
Name not unique on network.
.TP
-.B ENXIO
+.B ENXIO (6)
No such device or address (POSIX.1).
.TP
-.B EOPNOTSUPP
+.B EOPNOTSUPP (95)
Operation not supported on socket (POSIX.1).
.IP
.RB ( ENOTSUP
@@ -412,67 +413,67 @@ and
have the same value on Linux, but
according to POSIX.1 these error values should be distinct.)
.TP
-.B EOVERFLOW
+.B EOVERFLOW (75)
Value too large to be stored in data type (POSIX.1).
.TP
-.B EPERM
+.B EPERM (1)
Operation not permitted (POSIX.1).
.TP
-.B EPFNOSUPPORT
+.B EPFNOSUPPORT (96)
Protocol family not supported.
.TP
-.B EPIPE
+.B EPIPE (32)
Broken pipe (POSIX.1).
.TP
-.B EPROTO
+.B EPROTO (71)
Protocol error (POSIX.1).
.TP
-.B EPROTONOSUPPORT
+.B EPROTONOSUPPORT (93)
Protocol not supported (POSIX.1).
.TP
-.B EPROTOTYPE
+.B EPROTOTYPE (91)
Protocol wrong type for socket (POSIX.1).
.TP
-.B ERANGE
+.B ERANGE (34)
Result too large (POSIX.1, C99).
.TP
-.B EREMCHG
+.B EREMCHG (78)
Remote address changed.
.TP
-.B EREMOTE
+.B EREMOTE (66)
Object is remote.
.TP
-.B EREMOTEIO
+.B EREMOTEIO (121)
Remote I/O error.
.TP
-.B ERESTART
+.B ERESTART (85)
Interrupted system call should be restarted.
.TP
-.B EROFS
+.B EROFS (30)
Read-only filesystem (POSIX.1).
.TP
-.B ESHUTDOWN
+.B ESHUTDOWN (108)
Cannot send after transport endpoint shutdown.
.TP
-.B ESPIPE
+.B ESPIPE (29)
Invalid seek (POSIX.1).
.TP
-.B ESOCKTNOSUPPORT
+.B ESOCKTNOSUPPORT (94)
Socket type not supported.
.TP
-.B ESRCH
+.B ESRCH (3)
No such process (POSIX.1).
.\" ESRMNT is defined but appears not to be used
.TP
-.B ESTALE
+.B ESTALE (116)
Stale file handle (POSIX.1).
.IP
This error can occur for NFS and for other filesystems.
.TP
-.B ESTRPIPE
+.B ESTRPIPE (86)
Streams pipe error.
.TP
-.B ETIME
+.B ETIME (62)
Timer expired.
(POSIX.1 (XSI STREAMS option))
.IP
@@ -480,31 +481,31 @@ Timer expired.
.BR ioctl (2)
timeout")
.TP
-.B ETIMEDOUT
+.B ETIMEDOUT (110)
Connection timed out (POSIX.1).
.\" ETOOMANYREFS is defined, but appears not to be used.
.TP
-.B ETXTBSY
+.B ETXTBSY (26)
Text file busy (POSIX.1).
.TP
-.B EUCLEAN
+.B EUCLEAN (117)
Structure needs cleaning.
.TP
-.B EUNATCH
+.B EUNATCH (49)
Protocol driver not attached.
.TP
-.B EUSERS
+.B EUSERS (87)
Too many users.
.TP
-.B EWOULDBLOCK
+.B EWOULDBLOCK (11)
Operation would block (may be same value as
.BR EAGAIN )
(POSIX.1).
.TP
-.B EXDEV
+.B EXDEV (18)
Improper link (POSIX.1).
.TP
-.B EXFULL
+.B EXFULL (54)
Exchange full.
.SH NOTES
A common mistake is to do
--
2.14.1
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH] errno.3: Add values for all errors
[not found] ` <20171123001545.dp55g3pkdm5bzah3-8dEs2KUsCdXP0Z7Jsv878P8+0UxHXcjY@public.gmane.org>
@ 2017-11-23 8:31 ` Christoph Hellwig
[not found] ` <20171123083109.GA25458-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
0 siblings, 1 reply; 15+ messages in thread
From: Christoph Hellwig @ 2017-11-23 8:31 UTC (permalink / raw)
To: Wesley Aptekar-Cassels
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w,
linux-man-u79uwXL29TY76Z2rM5mHXA
On Wed, Nov 22, 2017 at 07:15:45PM -0500, Wesley Aptekar-Cassels wrote:
> This patch documents the values of error numbers on linux. This is
> something that is in the OpenBSD errno man page, which I find quite
> useful.
Error numbers are different for different architectures.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] errno.3: Add values for all errors
[not found] ` <20171123083109.GA25458-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
@ 2017-11-23 9:07 ` Michael Kerrisk (man-pages)
[not found] ` <f033a61a-f305-689d-b69a-72267ef767c1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 15+ messages in thread
From: Michael Kerrisk (man-pages) @ 2017-11-23 9:07 UTC (permalink / raw)
To: Christoph Hellwig, Wesley Aptekar-Cassels
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w,
linux-man-u79uwXL29TY76Z2rM5mHXA
On 11/23/2017 09:31 AM, Christoph Hellwig wrote:
> On Wed, Nov 22, 2017 at 07:15:45PM -0500, Wesley Aptekar-Cassels wrote:
>> This patch documents the values of error numbers on linux. This is
>> something that is in the OpenBSD errno man page, which I find quite
>> useful.
>
> Error numbers are different for different architectures.
I was just about to say the same.
Someone else recently proposed the same change, and I should have
thought then to add the text that I have added just now to errno(3).
Hopefully this goes someway to addressing your requirements, Wesley.
New text:
On Linux, the error numbers that correspond to each symbolic name
vary somewhat across architectures. Therefore, numeric values are
not included in the list of error names below. On any particular
system, one can obtain a list of all symbolic error names and the
corresponding error numbers using the errno(1) command:
$ errno -l
EPERM 1 Operation not permitted
ENOENT 2 No such file or directory
ESRCH 3 No such process
EINTR 4 Interrupted system call
EIO 5 Input/output error
...
The errno(1) command can also be used to look up individual error
numbers and names as in the following examples:
$ errno 2
ENOENT 2 No such file or directory
$ errno ESRCH
ESRCH 3 No such process
Cheers,
Michael
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] errno.3: Add values for all errors
[not found] ` <f033a61a-f305-689d-b69a-72267ef767c1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2017-11-23 9:12 ` Christoph Hellwig
[not found] ` <20171123091247.GA7460-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2017-11-23 9:23 ` walter harms
1 sibling, 1 reply; 15+ messages in thread
From: Christoph Hellwig @ 2017-11-23 9:12 UTC (permalink / raw)
To: Michael Kerrisk (man-pages)
Cc: Christoph Hellwig, Wesley Aptekar-Cassels,
linux-man-u79uwXL29TY76Z2rM5mHXA
On Thu, Nov 23, 2017 at 10:07:13AM +0100, Michael Kerrisk (man-pages) wrote:
> On Linux, the error numbers that correspond to each symbolic name
> vary somewhat across architectures. Therefore, numeric values are
> not included in the list of error names below. On any particular
> system, one can obtain a list of all symbolic error names and the
> corresponding error numbers using the errno(1) command:
What package does the errno command come with? It would have been very
useful for me multuple times, but doesn't come by default at least on my
Debian stretch system, and a simple apt-cache search didn't find it
either.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] errno.3: Add values for all errors
[not found] ` <f033a61a-f305-689d-b69a-72267ef767c1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-11-23 9:12 ` Christoph Hellwig
@ 2017-11-23 9:23 ` walter harms
[not found] ` <5A169376.90002-fPG8STNUNVg@public.gmane.org>
1 sibling, 1 reply; 15+ messages in thread
From: walter harms @ 2017-11-23 9:23 UTC (permalink / raw)
To: Michael Kerrisk (man-pages)
Cc: Christoph Hellwig, Wesley Aptekar-Cassels,
linux-man-u79uwXL29TY76Z2rM5mHXA
Am 23.11.2017 10:07, schrieb Michael Kerrisk (man-pages):
> On 11/23/2017 09:31 AM, Christoph Hellwig wrote:
>> On Wed, Nov 22, 2017 at 07:15:45PM -0500, Wesley Aptekar-Cassels wrote:
>>> This patch documents the values of error numbers on linux. This is
>>> something that is in the OpenBSD errno man page, which I find quite
>>> useful.
>>
>> Error numbers are different for different architectures.
>
> I was just about to say the same.
>
> Someone else recently proposed the same change, and I should have
> thought then to add the text that I have added just now to errno(3).
> Hopefully this goes someway to addressing your requirements, Wesley.
>
> New text:
>
> On Linux, the error numbers that correspond to each symbolic name
> vary somewhat across architectures. Therefore, numeric values are
> not included in the list of error names below. On any particular
> system, one can obtain a list of all symbolic error names and the
> corresponding error numbers using the errno(1) command:
>
If i read this that would mean the values differ between the linux architectures only.
I do not ting that was intended. What about that:
Portability:
Programmers should use always the symbolic names as that the value of errno may vary
across different systems. Always use strerror (3) (or compareable) to translate
the errno code into a human readable string.
note: errno (1) is a nice programm and it could be mentioned but a propper programm
simply should not say things like "Error: 13".
re,
wh
> $ errno -l
> EPERM 1 Operation not permitted
> ENOENT 2 No such file or directory
> ESRCH 3 No such process
> EINTR 4 Interrupted system call
> EIO 5 Input/output error
> ...
>
> The errno(1) command can also be used to look up individual error
> numbers and names as in the following examples:
>
> $ errno 2
> ENOENT 2 No such file or directory
> $ errno ESRCH
> ESRCH 3 No such process
>
> Cheers,
>
> Michael
>
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] errno.3: Add values for all errors
[not found] ` <20171123091247.GA7460-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
@ 2017-11-23 9:46 ` Eugene Syromyatnikov
[not found] ` <CACGkJduG6oTqnGa4=COV2o+S2AtpGTVTPcV1Uz6J=M9+fZR1Nw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-23 9:51 ` Michael Kerrisk (man-pages)
1 sibling, 1 reply; 15+ messages in thread
From: Eugene Syromyatnikov @ 2017-11-23 9:46 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Michael Kerrisk (man-pages), Wesley Aptekar-Cassels, linux-man
On Thu, Nov 23, 2017 at 9:12 AM, Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org> wrote:
> On Thu, Nov 23, 2017 at 10:07:13AM +0100, Michael Kerrisk (man-pages) wrote:
>> On Linux, the error numbers that correspond to each symbolic name
>> vary somewhat across architectures. Therefore, numeric values are
>> not included in the list of error names below. On any particular
>> system, one can obtain a list of all symbolic error names and the
>> corresponding error numbers using the errno(1) command:
>
> What package does the errno command come with? It would have been very
> useful for me multuple times, but doesn't come by default at least on my
> Debian stretch system, and a simple apt-cache search didn't find it
> either.
% apt-file search /usr/bin/errno
moreutils: /usr/bin/errno
--
Eugene Syromyatnikov
mailto:evgsyr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
xmpp:esyr@jabber.{ru|org}
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] errno.3: Add values for all errors
[not found] ` <5A169376.90002-fPG8STNUNVg@public.gmane.org>
@ 2017-11-23 9:47 ` Michael Kerrisk (man-pages)
[not found] ` <CAKgNAkiRdXxXWznvwOneU9uQqPYHs-JM0thiFEjveSPpt8GdNg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 15+ messages in thread
From: Michael Kerrisk (man-pages) @ 2017-11-23 9:47 UTC (permalink / raw)
To: Walter Harms; +Cc: Christoph Hellwig, Wesley Aptekar-Cassels, linux-man
Hi Walter,
On 23 November 2017 at 10:23, walter harms <wharms-fPG8STNUNVg@public.gmane.org> wrote:
>
>
> Am 23.11.2017 10:07, schrieb Michael Kerrisk (man-pages):
>> On 11/23/2017 09:31 AM, Christoph Hellwig wrote:
>>> On Wed, Nov 22, 2017 at 07:15:45PM -0500, Wesley Aptekar-Cassels wrote:
>>>> This patch documents the values of error numbers on linux. This is
>>>> something that is in the OpenBSD errno man page, which I find quite
>>>> useful.
>>>
>>> Error numbers are different for different architectures.
>>
>> I was just about to say the same.
>>
>> Someone else recently proposed the same change, and I should have
>> thought then to add the text that I have added just now to errno(3).
>> Hopefully this goes someway to addressing your requirements, Wesley.
>>
>> New text:
>>
>> On Linux, the error numbers that correspond to each symbolic name
>> vary somewhat across architectures. Therefore, numeric values are
>> not included in the list of error names below. On any particular
>> system, one can obtain a list of all symbolic error names and the
>> corresponding error numbers using the errno(1) command:
>>
> If i read this that would mean the values differ between the linux architectures only.
> I do not ting that was intended.
Indeed. So, I changed the text to:
The error numbers that correspond to each symbolic name vary
across UNIX systems, and even across different architectures on
Linux. Therefore, numeric values are not included in the list of
error names below. Portable applications should use the symbolic
error names (rather than explicit error numbers). The perror(3)
and strerror(3) functions can be used to convert these names to
corresponding textual error messages.
> What about that:
>
>
> Portability:
> Programmers should use always the symbolic names as that the value of errno may vary
> across different systems. Always use strerror (3) (or compareable) to translate
> the errno code into a human readable string.
>
> note: errno (1) is a nice programm and it could be mentioned but a propper programm
> simply should not say things like "Error: 13".
I'm not sure what you are referring to with the preceding line.
Thanks for the input, Walter.
Cheers,
Michael
> re,
> wh
>
>
>> $ errno -l
>> EPERM 1 Operation not permitted
>> ENOENT 2 No such file or directory
>> ESRCH 3 No such process
>> EINTR 4 Interrupted system call
>> EIO 5 Input/output error
>> ...
>>
>> The errno(1) command can also be used to look up individual error
>> numbers and names as in the following examples:
>>
>> $ errno 2
>> ENOENT 2 No such file or directory
>> $ errno ESRCH
>> ESRCH 3 No such process
>>
>> Cheers,
>>
>> Michael
>>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] errno.3: Add values for all errors
[not found] ` <CACGkJduG6oTqnGa4=COV2o+S2AtpGTVTPcV1Uz6J=M9+fZR1Nw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-11-23 9:48 ` Michael Kerrisk (man-pages)
[not found] ` <CAKgNAkj-_+o7sDWgn7CwR=Tm5TFdxLuVM+89779vZOL-2atCwg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 15+ messages in thread
From: Michael Kerrisk (man-pages) @ 2017-11-23 9:48 UTC (permalink / raw)
To: Eugene Syromyatnikov; +Cc: Christoph Hellwig, Wesley Aptekar-Cassels, linux-man
Hi Eugene,
On 23 November 2017 at 10:46, Eugene Syromyatnikov <evgsyr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> On Thu, Nov 23, 2017 at 9:12 AM, Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org> wrote:
>> On Thu, Nov 23, 2017 at 10:07:13AM +0100, Michael Kerrisk (man-pages) wrote:
>>> On Linux, the error numbers that correspond to each symbolic name
>>> vary somewhat across architectures. Therefore, numeric values are
>>> not included in the list of error names below. On any particular
>>> system, one can obtain a list of all symbolic error names and the
>>> corresponding error numbers using the errno(1) command:
>>
>> What package does the errno command come with? It would have been very
>> useful for me multuple times, but doesn't come by default at least on my
>> Debian stretch system, and a simple apt-cache search didn't find it
>> either.
>
> % apt-file search /usr/bin/errno
> moreutils: /usr/bin/errno
Please say more?
Cheers,
Michael
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] errno.3: Add values for all errors
[not found] ` <CAKgNAkj-_+o7sDWgn7CwR=Tm5TFdxLuVM+89779vZOL-2atCwg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-11-23 9:50 ` Michael Kerrisk (man-pages)
0 siblings, 0 replies; 15+ messages in thread
From: Michael Kerrisk (man-pages) @ 2017-11-23 9:50 UTC (permalink / raw)
To: Eugene Syromyatnikov; +Cc: Christoph Hellwig, Wesley Aptekar-Cassels, linux-man
On 23 November 2017 at 10:48, Michael Kerrisk (man-pages)
<mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hi Eugene,
>
> On 23 November 2017 at 10:46, Eugene Syromyatnikov <evgsyr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> On Thu, Nov 23, 2017 at 9:12 AM, Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org> wrote:
>>> On Thu, Nov 23, 2017 at 10:07:13AM +0100, Michael Kerrisk (man-pages) wrote:
>>>> On Linux, the error numbers that correspond to each symbolic name
>>>> vary somewhat across architectures. Therefore, numeric values are
>>>> not included in the list of error names below. On any particular
>>>> system, one can obtain a list of all symbolic error names and the
>>>> corresponding error numbers using the errno(1) command:
>>>
>>> What package does the errno command come with? It would have been very
>>> useful for me multuple times, but doesn't come by default at least on my
>>> Debian stretch system, and a simple apt-cache search didn't find it
>>> either.
>>
>> % apt-file search /usr/bin/errno
>> moreutils: /usr/bin/errno
>
> Please say more?
Ooops -- ignore my mail. I missed that this was a reply to another message.
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] errno.3: Add values for all errors
[not found] ` <20171123091247.GA7460-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2017-11-23 9:46 ` Eugene Syromyatnikov
@ 2017-11-23 9:51 ` Michael Kerrisk (man-pages)
[not found] ` <CAKgNAkhcB-uGhEF_+wC5ut8a7fErv+Wijti9DNF5P7F6HMLbaw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
1 sibling, 1 reply; 15+ messages in thread
From: Michael Kerrisk (man-pages) @ 2017-11-23 9:51 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Wesley Aptekar-Cassels, linux-man
On 23 November 2017 at 10:12, Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org> wrote:
> On Thu, Nov 23, 2017 at 10:07:13AM +0100, Michael Kerrisk (man-pages) wrote:
>> On Linux, the error numbers that correspond to each symbolic name
>> vary somewhat across architectures. Therefore, numeric values are
>> not included in the list of error names below. On any particular
>> system, one can obtain a list of all symbolic error names and the
>> corresponding error numbers using the errno(1) command:
>
> What package does the errno command come with? It would have been very
> useful for me multuple times, but doesn't come by default at least on my
> Debian stretch system, and a simple apt-cache search didn't find it
> either.
It got added to the moreutils package in 2012. I only learned of its
existence in relatively recent times myself.
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] errno.3: Add values for all errors
[not found] ` <CAKgNAkiRdXxXWznvwOneU9uQqPYHs-JM0thiFEjveSPpt8GdNg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-11-23 10:57 ` walter harms
[not found] ` <5A16A9A0.30605-fPG8STNUNVg@public.gmane.org>
0 siblings, 1 reply; 15+ messages in thread
From: walter harms @ 2017-11-23 10:57 UTC (permalink / raw)
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man
Am 23.11.2017 10:47, schrieb Michael Kerrisk (man-pages):
> Hi Walter,
>
> On 23 November 2017 at 10:23, walter harms <wharms-fPG8STNUNVg@public.gmane.org> wrote:
>>
>>
>> Am 23.11.2017 10:07, schrieb Michael Kerrisk (man-pages):
>>> On 11/23/2017 09:31 AM, Christoph Hellwig wrote:
>>>> On Wed, Nov 22, 2017 at 07:15:45PM -0500, Wesley Aptekar-Cassels wrote:
>>>>> This patch documents the values of error numbers on linux. This is
>>>>> something that is in the OpenBSD errno man page, which I find quite
>>>>> useful.
>>>>
>>>> Error numbers are different for different architectures.
>>>
>>> I was just about to say the same.
>>>
>>> Someone else recently proposed the same change, and I should have
>>> thought then to add the text that I have added just now to errno(3).
>>> Hopefully this goes someway to addressing your requirements, Wesley.
>>>
>>> New text:
>>>
>>> On Linux, the error numbers that correspond to each symbolic name
>>> vary somewhat across architectures. Therefore, numeric values are
>>> not included in the list of error names below. On any particular
>>> system, one can obtain a list of all symbolic error names and the
>>> corresponding error numbers using the errno(1) command:
>>>
>> If i read this that would mean the values differ between the linux architectures only.
>> I do not ting that was intended.
>
> Indeed. So, I changed the text to:
>
> The error numbers that correspond to each symbolic name vary
> across UNIX systems, and even across different architectures on
> Linux. Therefore, numeric values are not included in the list of
> error names below. Portable applications should use the symbolic
> error names (rather than explicit error numbers). The perror(3)
> and strerror(3) functions can be used to convert these names to
> corresponding textual error messages.
>
>> What about that:
>>
>>
>> Portability:
>> Programmers should use always the symbolic names as that the value of errno may vary
>> across different systems. Always use strerror (3) (or compareable) to translate
>> the errno code into a human readable string.
>>
>> note: errno (1) is a nice programm and it could be mentioned but a propper programm
>> simply should not say things like "Error: 13".
>
> I'm not sure what you are referring to with the preceding line.
>
I would move the bulk of the text to a portability section or like because this is
the section where i would expect that information.
NTL i was not aware that different linux versions have different code for the same
error that should be changed.
Also i would drop "Portable" simply write "applications should use ..." there
is no reason to write programms that require the numeric value. Corner cases may exists
but a man page is no law, so i see no problem.
just my 2 cents,
re,
wh
> Thanks for the input, Walter.
>
> Cheers,
>
> Michael
>
>> re,
>> wh
>>
>>
>>> $ errno -l
>>> EPERM 1 Operation not permitted
>>> ENOENT 2 No such file or directory
>>> ESRCH 3 No such process
>>> EINTR 4 Interrupted system call
>>> EIO 5 Input/output error
>>> ...
>>>
>>> The errno(1) command can also be used to look up individual error
>>> numbers and names as in the following examples:
>>>
>>> $ errno 2
>>> ENOENT 2 No such file or directory
>>> $ errno ESRCH
>>> ESRCH 3 No such process
>>>
>>> Cheers,
>>>
>>> Michael
>>>
>
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] errno.3: Add values for all errors
[not found] ` <CAKgNAkhcB-uGhEF_+wC5ut8a7fErv+Wijti9DNF5P7F6HMLbaw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-11-23 12:56 ` Christoph Hellwig
[not found] ` <20171123125615.GA20708-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
0 siblings, 1 reply; 15+ messages in thread
From: Christoph Hellwig @ 2017-11-23 12:56 UTC (permalink / raw)
To: Michael Kerrisk (man-pages)
Cc: Christoph Hellwig, Wesley Aptekar-Cassels, linux-man
On Thu, Nov 23, 2017 at 10:51:52AM +0100, Michael Kerrisk (man-pages) wrote:
> It got added to the moreutils package in 2012. I only learned of its
> existence in relatively recent times myself.
Maybe you should mention moreutils explicitly in the man page so that
people can find the utility?
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] errno.3: Add values for all errors
[not found] ` <20171123125615.GA20708-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
@ 2017-11-23 12:58 ` Michael Kerrisk (man-pages)
0 siblings, 0 replies; 15+ messages in thread
From: Michael Kerrisk (man-pages) @ 2017-11-23 12:58 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Wesley Aptekar-Cassels, linux-man
On 23 November 2017 at 13:56, Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org> wrote:
> On Thu, Nov 23, 2017 at 10:51:52AM +0100, Michael Kerrisk (man-pages) wrote:
>> It got added to the moreutils package in 2012. I only learned of its
>> existence in relatively recent times myself.
>
> Maybe you should mention moreutils explicitly in the man page so that
> people can find the utility?
I see the motivation for your comment, but it's not otherwise the
approach in man-pages when mentioning utilities from other projects,
so I'm disinclined to start down that path.
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] errno.3: Add values for all errors
[not found] ` <5A16A9A0.30605-fPG8STNUNVg@public.gmane.org>
@ 2017-11-23 20:34 ` Michael Kerrisk (man-pages)
[not found] ` <a4fce689-60e8-38d2-6310-d90103532a0c-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 15+ messages in thread
From: Michael Kerrisk (man-pages) @ 2017-11-23 20:34 UTC (permalink / raw)
To: wharms-fPG8STNUNVg; +Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w, linux-man
On 11/23/2017 11:57 AM, walter harms wrote:
>
>
> Am 23.11.2017 10:47, schrieb Michael Kerrisk (man-pages):
>> Hi Walter,
>>
>> On 23 November 2017 at 10:23, walter harms <wharms-fPG8STNUNVg@public.gmane.org> wrote:
>>>
>>>
>>> Am 23.11.2017 10:07, schrieb Michael Kerrisk (man-pages):
>>>> On 11/23/2017 09:31 AM, Christoph Hellwig wrote:
>>>>> On Wed, Nov 22, 2017 at 07:15:45PM -0500, Wesley Aptekar-Cassels wrote:
>>>>>> This patch documents the values of error numbers on linux. This is
>>>>>> something that is in the OpenBSD errno man page, which I find quite
>>>>>> useful.
>>>>>
>>>>> Error numbers are different for different architectures.
>>>>
>>>> I was just about to say the same.
>>>>
>>>> Someone else recently proposed the same change, and I should have
>>>> thought then to add the text that I have added just now to errno(3).
>>>> Hopefully this goes someway to addressing your requirements, Wesley.
>>>>
>>>> New text:
>>>>
>>>> On Linux, the error numbers that correspond to each symbolic name
>>>> vary somewhat across architectures. Therefore, numeric values are
>>>> not included in the list of error names below. On any particular
>>>> system, one can obtain a list of all symbolic error names and the
>>>> corresponding error numbers using the errno(1) command:
>>>>
>>> If i read this that would mean the values differ between the linux architectures only.
>>> I do not ting that was intended.
>>
>> Indeed. So, I changed the text to:
>>
>> The error numbers that correspond to each symbolic name vary
>> across UNIX systems, and even across different architectures on
>> Linux. Therefore, numeric values are not included in the list of
>> error names below. Portable applications should use the symbolic
>> error names (rather than explicit error numbers). The perror(3)
>> and strerror(3) functions can be used to convert these names to
>> corresponding textual error messages.
>>
>>> What about that:
>>>
>>>
>>> Portability:
>>> Programmers should use always the symbolic names as that the value of errno may vary
>>> across different systems. Always use strerror (3) (or compareable) to translate
>>> the errno code into a human readable string.
>>>
>>> note: errno (1) is a nice programm and it could be mentioned but a propper programm
>>> simply should not say things like "Error: 13".
>>
>> I'm not sure what you are referring to with the preceding line.
>>
>
> I would move the bulk of the text to a portability section or like because this is
> the section where i would expect that information.
Moving this off into a separate section doesn't really fit with the
overall structure of the page, I think. (All changes are pushed to Git
now, so you can take a look.) So, I'll leave things as they
are for now.
> NTL i was not aware that different linux versions have different code for the same
> error that should be changed.
> Also i would drop "Portable" simply write "applications should use ..." there
> is no reason to write programms that require the numeric value. Corner cases may exists
> but a man page is no law, so i see no problem.
So, I think what this convinces me to do is just drop this sentence:
Portable applications should use the symbolic error names
(rather than explicit error numbers).
I think you're right that it does not add much to the discussion.
Thanks,
Michael
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] errno.3: Add values for all errors
[not found] ` <a4fce689-60e8-38d2-6310-d90103532a0c-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2017-11-24 15:37 ` walter harms
0 siblings, 0 replies; 15+ messages in thread
From: walter harms @ 2017-11-24 15:37 UTC (permalink / raw)
To: Michael Kerrisk (man-pages); +Cc: linux-man
Am 23.11.2017 21:34, schrieb Michael Kerrisk (man-pages):
> On 11/23/2017 11:57 AM, walter harms wrote:
>>
>>
>> Am 23.11.2017 10:47, schrieb Michael Kerrisk (man-pages):
>>> Hi Walter,
>>>
>>> On 23 November 2017 at 10:23, walter harms <wharms-fPG8STNUNVg@public.gmane.org> wrote:
>>>>
>>>>
>>>> Am 23.11.2017 10:07, schrieb Michael Kerrisk (man-pages):
>>>>> On 11/23/2017 09:31 AM, Christoph Hellwig wrote:
>>>>>> On Wed, Nov 22, 2017 at 07:15:45PM -0500, Wesley Aptekar-Cassels wrote:
>>>>>>> This patch documents the values of error numbers on linux. This is
>>>>>>> something that is in the OpenBSD errno man page, which I find quite
>>>>>>> useful.
>>>>>>
>>>>>> Error numbers are different for different architectures.
>>>>>
>>>>> I was just about to say the same.
>>>>>
>>>>> Someone else recently proposed the same change, and I should have
>>>>> thought then to add the text that I have added just now to errno(3).
>>>>> Hopefully this goes someway to addressing your requirements, Wesley.
>>>>>
>>>>> New text:
>>>>>
>>>>> On Linux, the error numbers that correspond to each symbolic name
>>>>> vary somewhat across architectures. Therefore, numeric values are
>>>>> not included in the list of error names below. On any particular
>>>>> system, one can obtain a list of all symbolic error names and the
>>>>> corresponding error numbers using the errno(1) command:
>>>>>
>>>> If i read this that would mean the values differ between the linux architectures only.
>>>> I do not ting that was intended.
>>>
>>> Indeed. So, I changed the text to:
>>>
>>> The error numbers that correspond to each symbolic name vary
>>> across UNIX systems, and even across different architectures on
>>> Linux. Therefore, numeric values are not included in the list of
>>> error names below. Portable applications should use the symbolic
>>> error names (rather than explicit error numbers). The perror(3)
>>> and strerror(3) functions can be used to convert these names to
>>> corresponding textual error messages.
>>>
>>>> What about that:
>>>>
>>>>
>>>> Portability:
>>>> Programmers should use always the symbolic names as that the value of errno may vary
>>>> across different systems. Always use strerror (3) (or compareable) to translate
>>>> the errno code into a human readable string.
>>>>
>>>> note: errno (1) is a nice programm and it could be mentioned but a propper programm
>>>> simply should not say things like "Error: 13".
>>>
>>> I'm not sure what you are referring to with the preceding line.
>>>
>>
>> I would move the bulk of the text to a portability section or like because this is
>> the section where i would expect that information.
>
> Moving this off into a separate section doesn't really fit with the
> overall structure of the page, I think. (All changes are pushed to Git
> now, so you can take a look.) So, I'll leave things as they
> are for now.
>
>> NTL i was not aware that different linux versions have different code for the same
>> error that should be changed.
>> Also i would drop "Portable" simply write "applications should use ..." there
>> is no reason to write programms that require the numeric value. Corner cases may exists
>> but a man page is no law, so i see no problem.
>
> So, I think what this convinces me to do is just drop this sentence:
>
> Portable applications should use the symbolic error names
> (rather than explicit error numbers).
>
> I think you're right that it does not add much to the discussion.
>
This is not what i had in mind. The sentence is right because we are discussing
the documentation of the real (numeric) values behind symbolic names. The point
is that you write "even across different architectures on Linux" and since i understand
portable == other OS; that means you can *never* use the numeric value. Just imagine
someone will standardize the values across linux only.
Just emphasis that applications should always should use the symbolic error names.
re,
wh
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2017-11-24 15:37 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-23 0:15 [PATCH] errno.3: Add values for all errors Wesley Aptekar-Cassels
[not found] ` <20171123001545.dp55g3pkdm5bzah3-8dEs2KUsCdXP0Z7Jsv878P8+0UxHXcjY@public.gmane.org>
2017-11-23 8:31 ` Christoph Hellwig
[not found] ` <20171123083109.GA25458-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2017-11-23 9:07 ` Michael Kerrisk (man-pages)
[not found] ` <f033a61a-f305-689d-b69a-72267ef767c1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-11-23 9:12 ` Christoph Hellwig
[not found] ` <20171123091247.GA7460-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2017-11-23 9:46 ` Eugene Syromyatnikov
[not found] ` <CACGkJduG6oTqnGa4=COV2o+S2AtpGTVTPcV1Uz6J=M9+fZR1Nw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-23 9:48 ` Michael Kerrisk (man-pages)
[not found] ` <CAKgNAkj-_+o7sDWgn7CwR=Tm5TFdxLuVM+89779vZOL-2atCwg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-23 9:50 ` Michael Kerrisk (man-pages)
2017-11-23 9:51 ` Michael Kerrisk (man-pages)
[not found] ` <CAKgNAkhcB-uGhEF_+wC5ut8a7fErv+Wijti9DNF5P7F6HMLbaw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-23 12:56 ` Christoph Hellwig
[not found] ` <20171123125615.GA20708-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2017-11-23 12:58 ` Michael Kerrisk (man-pages)
2017-11-23 9:23 ` walter harms
[not found] ` <5A169376.90002-fPG8STNUNVg@public.gmane.org>
2017-11-23 9:47 ` Michael Kerrisk (man-pages)
[not found] ` <CAKgNAkiRdXxXWznvwOneU9uQqPYHs-JM0thiFEjveSPpt8GdNg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-23 10:57 ` walter harms
[not found] ` <5A16A9A0.30605-fPG8STNUNVg@public.gmane.org>
2017-11-23 20:34 ` Michael Kerrisk (man-pages)
[not found] ` <a4fce689-60e8-38d2-6310-d90103532a0c-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-11-24 15:37 ` walter harms
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).