public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* aio_error query
@ 2012-01-21 21:48 Jon Grant
       [not found] ` <4F1B32A4.1010809-hus3n9K41k0@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Jon Grant @ 2012-01-21 21:48 UTC (permalink / raw)
  To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA

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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: aio_error query
       [not found] ` <4F1B32A4.1010809-hus3n9K41k0@public.gmane.org>
@ 2012-02-07 18:25   ` Michael Kerrisk
       [not found]     ` <CAKgNAkgjOss__FerDwEqMW2MY2Bs0pwyVuNURuvoKAw7si4u_w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Kerrisk @ 2012-02-07 18:25 UTC (permalink / raw)
  To: Jon Grant; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA

Hi Jon,

On Sun, Jan 22, 2012 at 10:48 AM, Jon Grant <jg-hus3n9K41k0@public.gmane.org> wrote:
> 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?

> 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


>       *  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



-- 
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] 8+ messages in thread

* Re: aio_error query
       [not found]     ` <CAKgNAkgjOss__FerDwEqMW2MY2Bs0pwyVuNURuvoKAw7si4u_w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2012-02-18 13:06       ` Jon Grant
       [not found]         ` <4F3FA267.4000208-hus3n9K41k0@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Jon Grant @ 2012-02-18 13:06 UTC (permalink / raw)
  To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA

Hi Michael

Michael Kerrisk wrote, On 07/02/12 18:25:
> Hi Jon,
>
> On Sun, Jan 22, 2012 at 10:48 AM, Jon Grant<jg-hus3n9K41k0@public.gmane.org>  wrote:
>> 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



>> 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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: aio_error query
       [not found]         ` <4F3FA267.4000208-hus3n9K41k0@public.gmane.org>
@ 2012-02-18 18:18           ` Michael Kerrisk
       [not found]             ` <CAKgNAkg2KYca3mA-Nd6_uRDDQpZmb+SFmLbZOFug9jVvHnB8NA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Kerrisk @ 2012-02-18 18:18 UTC (permalink / raw)
  To: Jon Grant; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA

Hi Jon,

On Sun, Feb 19, 2012 at 2:06 AM, Jon Grant <jg-hus3n9K41k0@public.gmane.org> wrote:
> Hi Michael
>
> Michael Kerrisk wrote, On 07/02/12 18:25:
>
>> Hi Jon,
>>
>> On Sun, Jan 22, 2012 at 10:48 AM, Jon Grant<jg-hus3n9K41k0@public.gmane.org>  wrote:
>>>
>>> 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.

Okay.

> http://pubs.opengroup.org/onlinepubs/009604599/functions/xsh_chap02_03.html
> http://www.cl.cam.ac.uk/cgi-bin/manpage?3+errno
>
>>> 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?

>> 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.

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


-- 
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] 8+ messages in thread

* Re: aio_error query
       [not found]             ` <CAKgNAkg2KYca3mA-Nd6_uRDDQpZmb+SFmLbZOFug9jVvHnB8NA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2012-02-18 20:37               ` Jon Grant
       [not found]                 ` <4F400BFB.5050409-hus3n9K41k0@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Jon Grant @ 2012-02-18 20:37 UTC (permalink / raw)
  To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA

Hi Michael

Michael Kerrisk wrote, On 18/02/12 18:18:
[...]
>> http://pubs.opengroup.org/onlinepubs/009604599/functions/xsh_chap02_03.html
>> http://www.cl.cam.ac.uk/cgi-bin/manpage?3+errno
>>
>>>> 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/

[..]
> 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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: aio_error query
       [not found]                 ` <4F400BFB.5050409-hus3n9K41k0@public.gmane.org>
@ 2012-02-19  2:40                   ` Michael Kerrisk
       [not found]                     ` <CAKgNAkg9ELf7WHxsB=PuGTj2KifW2pZqT6i5VBAfRX_ajqvcEw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Kerrisk @ 2012-02-19  2:40 UTC (permalink / raw)
  To: Jon Grant; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA

Hi Jon

On Sun, Feb 19, 2012 at 9:37 AM, Jon Grant <jg-hus3n9K41k0@public.gmane.org> wrote:
> Hi Michael
>
> Michael Kerrisk wrote, On 18/02/12 18:18:
> [...]
>
>>>
>>> http://pubs.opengroup.org/onlinepubs/009604599/functions/xsh_chap02_03.html
>>> http://www.cl.cam.ac.uk/cgi-bin/manpage?3+errno
>>>
>>>>> 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/

Is this actually a UNIX system?

> [..]
>
>> 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


-- 
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] 8+ messages in thread

* Re: aio_error query
       [not found]                     ` <CAKgNAkg9ELf7WHxsB=PuGTj2KifW2pZqT6i5VBAfRX_ajqvcEw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2012-02-19 11:15                       ` Jon Grant
       [not found]                         ` <4F40D9DB.2070203-hus3n9K41k0@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Jon Grant @ 2012-02-19 11:15 UTC (permalink / raw)
  To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA



Michael Kerrisk wrote, On 19/02/12 02:40:
> Hi Jon
>
> On Sun, Feb 19, 2012 at 9:37 AM, Jon Grant<jg-hus3n9K41k0@public.gmane.org>  wrote:
>> Hi Michael
>>
>> Michael Kerrisk wrote, On 18/02/12 18:18:
>> [...]
>>
>>>>
>>>> http://pubs.opengroup.org/onlinepubs/009604599/functions/xsh_chap02_03.html
>>>> http://www.cl.cam.ac.uk/cgi-bin/manpage?3+errno
>>>>
>>>>>> 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/
>
> 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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: aio_error query
       [not found]                         ` <4F40D9DB.2070203-hus3n9K41k0@public.gmane.org>
@ 2012-02-20  1:32                           ` Michael Kerrisk
  0 siblings, 0 replies; 8+ messages in thread
From: Michael Kerrisk @ 2012-02-20  1:32 UTC (permalink / raw)
  To: Jon Grant; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA

Hi Jon,

On Mon, Feb 20, 2012 at 12:15 AM, Jon Grant <jg-hus3n9K41k0@public.gmane.org> wrote:
>
>
> Michael Kerrisk wrote, On 19/02/12 02:40:
>
>> Hi Jon
>>
>> On Sun, Feb 19, 2012 at 9:37 AM, Jon Grant<jg-hus3n9K41k0@public.gmane.org>  wrote:
>>>
>>> Hi Michael
>>>
>>> Michael Kerrisk wrote, On 18/02/12 18:18:
>>> [...]
>>>
>>>>>
>>>>>
>>>>> http://pubs.opengroup.org/onlinepubs/009604599/functions/xsh_chap02_03.html
>>>>> http://www.cl.cam.ac.uk/cgi-bin/manpage?3+errno
>>>>>
>>>>>>> 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/
>>
>>
>> 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


-- 
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] 8+ messages in thread

end of thread, other threads:[~2012-02-20  1:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-21 21:48 aio_error query Jon Grant
     [not found] ` <4F1B32A4.1010809-hus3n9K41k0@public.gmane.org>
2012-02-07 18:25   ` Michael Kerrisk
     [not found]     ` <CAKgNAkgjOss__FerDwEqMW2MY2Bs0pwyVuNURuvoKAw7si4u_w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-02-18 13:06       ` Jon Grant
     [not found]         ` <4F3FA267.4000208-hus3n9K41k0@public.gmane.org>
2012-02-18 18:18           ` Michael Kerrisk
     [not found]             ` <CAKgNAkg2KYca3mA-Nd6_uRDDQpZmb+SFmLbZOFug9jVvHnB8NA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-02-18 20:37               ` Jon Grant
     [not found]                 ` <4F400BFB.5050409-hus3n9K41k0@public.gmane.org>
2012-02-19  2:40                   ` Michael Kerrisk
     [not found]                     ` <CAKgNAkg9ELf7WHxsB=PuGTj2KifW2pZqT6i5VBAfRX_ajqvcEw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-02-19 11:15                       ` Jon Grant
     [not found]                         ` <4F40D9DB.2070203-hus3n9K41k0@public.gmane.org>
2012-02-20  1:32                           ` Michael Kerrisk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox