* errno man page query
@ 2012-04-22 11:17 Jon Grant
[not found] ` <4F93E8C2.5000903-hus3n9K41k0@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Jon Grant @ 2012-04-22 11:17 UTC (permalink / raw)
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA
Hello
Quoting from this page:
http://man7.org/linux/man-pages/man3/errno.3.html
"a function that succeeds is allowed to change errno."
^ This sounds clear, e.g. open() can change errno to 0, when it returns
a valid fd handle.
"Valid error numbers are all nonzero; errno is never set to zero by any
system
call or library function."
^ This seems to be counter what the earlier line said. Therefore, open()
wouldn't be allowed to change errno to 0.
Have I missed something?
Best regards, Jon
--
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: errno man page query
[not found] ` <4F93E8C2.5000903-hus3n9K41k0@public.gmane.org>
@ 2012-04-22 21:14 ` Michael Kerrisk (man-pages)
0 siblings, 0 replies; 2+ messages in thread
From: Michael Kerrisk (man-pages) @ 2012-04-22 21:14 UTC (permalink / raw)
To: Jon Grant; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA
Hi Jon,
On Sun, Apr 22, 2012 at 11:17 PM, Jon Grant <jg-hus3n9K41k0@public.gmane.org> wrote:
> Hello
>
> Quoting from this page:
>
> http://man7.org/linux/man-pages/man3/errno.3.html
>
> "a function that succeeds is allowed to change errno."
>
> ^ This sounds clear, e.g. open() can change errno to 0, when it returns a
> valid fd handle.
>
>
> "Valid error numbers are all nonzero; errno is never set to zero by any
> system
> call or library function."
>
> ^ This seems to be counter what the earlier line said. Therefore, open()
> wouldn't be allowed to change errno to 0.
>
> Have I missed something?
I don't really see the problem. The first part says functions may
change errno. The second part adds a qualification; they'll never
change it to zero.
Cheers,
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-22 21:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-22 11:17 errno man page query Jon Grant
[not found] ` <4F93E8C2.5000903-hus3n9K41k0@public.gmane.org>
2012-04-22 21:14 ` Michael Kerrisk (man-pages)
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.