aio_error query
Hello
http://www.kernel.org/doc/man-pages/online/pages/man3/aio_error.3.html
Is this really positive? errno is an int, and the values I think are not guaranteed to be positive (like with glibc). I work on a system where they are all negative.
* A positive error, if the asynchronous I/O operation failed.
This is the
same value that would have been stored in the errno variable
in the case of
a synchronous read(2), write(2), fsync(2), or fdatasync(2) call.
Best regards, Jon
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi Jon,
Quoted 5 lines · Jon Grant
Hello
http://www.kernel.org/doc/man-pages/online/pages/man3/aio_error.3.html
Is this really positive?
Do you have some counter-evidence?
Quoted 3 lines
errno is an int, and the values I think are not
guaranteed to be positive (like with glibc). I work on a system where they are all negative.
Error numbers are all positive. I don't understand your last sentence above.
Cheers,
Michael
Quoted 7 lines
* A positive error, if the asynchronous I/O operation failed. This is the
same value that would have been stored in the errno variable in the case of
a synchronous read(2), write(2), fsync(2), or fdatasync(2) call.Best regards, Jon
Signature · 7 lines
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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): CAKgNAkgjOss__FerDwEqMW2MY2Bs0pwyVuNURuvoKAw7si4u_w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Hi Michael
Michael Kerrisk wrote, On 07/02/12 18:25:
Quoted 10 lines
Hi Jon,
Quoted 5 lines · Jon Grant
Hello
http://www.kernel.org/doc/man-pages/online/pages/man3/aio_error.3.html
Is this really positive?
Do you have some counter-evidence?
aio_return returns an int. POSIX and ISO C specifies errno as an int. Neither say that it is a positive number.
http://pubs.opengroup.org/onlinepubs/009604599/functions/xsh_chap02_03.html
http://www.cl.cam.ac.uk/cgi-bin/manpage?3+errno
Quoted 5 lines
Quoted 3 lines
errno is an int, and the values I think are not
guaranteed to be positive (like with glibc). I work on a system where they are all negative.Error numbers are all positive. I don't understand your last sentence above.
This may be the case in glibc/linux, but in my experience it is not a standard. "errno" is an int:
http://pubs.opengroup.org/onlinepubs/009604599/functions/xsh_chap02_03.html
I work on systems where the EFAULT, EINVAL etc are negative values. So it depends if the man page documents linux/glibc specific implementation, or the standards.
Do correct me if I have missed something.
Best regards, Jon
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi Jon,
Quoted 15 lines · Jon Grant
Hi Michael
Michael Kerrisk wrote, On 07/02/12 18:25:
Quoted 11 lines
Hi Jon,
Quoted 6 lines · Jon Grant
Hello
http://www.kernel.org/doc/man-pages/online/pages/man3/aio_error.3.html
Is this really positive?
Quoted 6 lines
Quoted 1 line
Do you have some counter-evidence?
aio_returnreturns an int. POSIX and ISO C specifies errno as an int. Neither say that it is a positive number.
Okay.
Quoted 7 lines
http://pubs.opengroup.org/onlinepubs/009604599/functions/xsh_chap02_03.html
http://www.cl.cam.ac.uk/cgi-bin/manpage?3+errnoQuoted 4 lines
Quoted 4 lines
errno is an int, and the values I think are not
guaranteed to be positive (like with glibc). I work on a system where they
are all negative.
What is the system?
Quoted 7 lines
Quoted 2 lines
Error numbers are all positive. I don't understand your last sentence above.
This may be the case in glibc/linux, but in my experience it is not a standard. "errno" is an int:
Quoted 7 lines
http://pubs.opengroup.org/onlinepubs/009604599/functions/xsh_chap02_03.html
I work on systems where the EFAULT, EINVAL etc are negative values. So it depends if the man page documents linux/glibc specific implementation, or the standards.
Do correct me if I have missed something.
What you say is now clearer to me, and sounds reasonable. Still, I'm curious about this other system you are using; I think on every system I encountered, error numbers are positive.
Thanks,
Michael
Signature · 7 lines
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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): CAKgNAkg2KYca3mA-Nd6_uRDDQpZmb+SFmLbZOFug9jVvHnB8NA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Hi Michael
Michael Kerrisk wrote, On 18/02/12 18:18:
[...]
Quoted 9 lines
Quoted 7 lines
http://pubs.opengroup.org/onlinepubs/009604599/functions/xsh_chap02_03.html
http://www.cl.cam.ac.uk/cgi-bin/manpage?3+errnoQuoted 4 lines
Quoted 4 lines
errno is an int, and the values I think are not
guaranteed to be positive (like with glibc). I work on a system where they
are all negative.What is the system?
http://www.mpcdata.com/mediasdk/
[..]
Quoted 3 lines
What you say is now clearer to me, and sounds reasonable. Still, I'm curious about this other system you are using; I think on every system I encountered, error numbers are positive.
Perhaps errno macros as positive numbers are a de facto convention.
Regards, Jon
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi Jon
Quoted 15 lines · Jon Grant
Hi Michael
Michael Kerrisk wrote, On 18/02/12 18:18:
[...]Quoted 10 lines
Quoted 8 lines
http://pubs.opengroup.org/onlinepubs/009604599/functions/xsh_chap02_03.html
http://www.cl.cam.ac.uk/cgi-bin/manpage?3+errnoQuoted 4 lines
Quoted 4 lines
errno is an int, and the values I think are not
guaranteed to be positive (like with glibc). I work on a system where they
are all negative.
Quoted 4 lines
Quoted 1 line
What is the system?
Is this actually a UNIX system?
Quoted 7 lines
[..]
Quoted 3 lines
What you say is now clearer to me, and sounds reasonable. Still, I'm curious about this other system you are using; I think on every system I encountered, error numbers are positive.
Perhaps errno macros as positive numbers are a de facto convention.
It appears to be so, but AFAICS you're correct about POSIX not mandating it. I'll check into this some more.
Cheers,
Michael
Signature · 7 lines
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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): CAKgNAkg9ELf7WHxsB=PuGTj2KifW2pZqT6i5VBAfRX_ajqvcEw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Michael Kerrisk wrote, On 19/02/12 02:40:
Quoted 18 lines
Hi Jon
Quoted 15 lines · Jon Grant
Hi Michael
Michael Kerrisk wrote, On 18/02/12 18:18:
[...]Quoted 10 lines
Quoted 8 lines
http://pubs.opengroup.org/onlinepubs/009604599/functions/xsh_chap02_03.html
http://www.cl.cam.ac.uk/cgi-bin/manpage?3+errnoQuoted 4 lines
Quoted 4 lines
errno is an int, and the values I think are not
guaranteed to be positive (like with glibc). I work on a system where they
are all negative.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
What is the system?
Is this actually a UNIX system?
No.
Regards, Jon
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi Jon,
Quoted 29 lines · Jon Grant
Michael Kerrisk wrote, On 19/02/12 02:40:
Quoted 25 lines
Hi Jon
Quoted 22 lines · Jon Grant
Hi Michael
Michael Kerrisk wrote, On 18/02/12 18:18:
[...]Quoted 13 lines
Quoted 9 lines
http://pubs.opengroup.org/onlinepubs/009604599/functions/xsh_chap02_03.html
http://www.cl.cam.ac.uk/cgi-bin/manpage?3+errnoQuoted 4 lines
Quoted 4 lines
errno is an int, and the values I think are not
guaranteed to be positive (like with glibc). I work on a system where they
are all negative.What is the system?
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Is this actually a UNIX system?
No.
(This would have been useful info early in the thread ;-).)
So, I checked with someone close to POSIX who pointed out to me that there is this text in the POSIX.1-2001 specification of the <errno.h> header file:
[[
The <errno.h> header shall provide a declaration for errno and give positive values for the following symbolic constants. Their values shall be unique except as noted below.
]]
So, I think the man page is fine (but you could file a bug with Renesas about their implementation).
Cheers,
Michael
Signature · 7 lines
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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html