* A bug? in the perror man page
@ 2012-03-09 10:36 jesus.otero
2012-04-15 10:37 ` Michael Kerrisk (man-pages)
0 siblings, 1 reply; 2+ messages in thread
From: jesus.otero @ 2012-03-09 10:36 UTC (permalink / raw)
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA
Hi!
Not sure if this is a bug, but, just in case...
When searching how to print error messages without using perror, the man page
of perror says
"The global error list sys_errlist[] indexed by errno can be used to obtain
the error message without the newline. The largest message number provided in
the table is sys_nerr -1. Be careful when directly accessing this list
because new error values may not have been added to sys_errlist[]."
Searching for sys_errlist on the kernel includes pointed me to the file
<bits/sys_errlist.h> where it says that sys_errlist[] is deprecated,
recommending you to use strerror. Doing a google search confirm me this.
Shouldn't this be reflected on perror's man page?
I'm running an Ubuntu 10.04.4 LTS
My kernel version 2.6.32-39-generic-pae
I've installed the man page for perror version 3.23-1
Thanks
--
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] 2+ messages in thread
* Re: A bug? in the perror man page
2012-03-09 10:36 A bug? in the perror man page jesus.otero
@ 2012-04-15 10:37 ` Michael Kerrisk (man-pages)
0 siblings, 0 replies; 2+ messages in thread
From: Michael Kerrisk (man-pages) @ 2012-04-15 10:37 UTC (permalink / raw)
To: jesus.otero; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA
Hello Jesus,
On Fri, Mar 9, 2012 at 11:36 PM, jesus.otero <jesus.otero-zg5kjA6Mr10@public.gmane.org> wrote:
> Hi!
>
> Not sure if this is a bug, but, just in case...
>
> When searching how to print error messages without using perror, the man page
> of perror says
>
> "The global error list sys_errlist[] indexed by errno can be used to obtain
> the error message without the newline. The largest message number provided in
> the table is sys_nerr -1. Be careful when directly accessing this list
> because new error values may not have been added to sys_errlist[]."
>
> Searching for sys_errlist on the kernel includes pointed me to the file
> <bits/sys_errlist.h> where it says that sys_errlist[] is deprecated,
> recommending you to use strerror. Doing a google search confirm me this.
>
> Shouldn't this be reflected on perror's man page?
Yes, I think you're right. I added the sentence "The use of
sys_errlist[] is nowadays deprecated." to the man page.
Thanks,
Michael
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/
--
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] 2+ messages in thread
end of thread, other threads:[~2012-04-15 10:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-09 10:36 A bug? in the perror man page jesus.otero
2012-04-15 10:37 ` Michael Kerrisk (man-pages)
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).