Re: [LTP] [PATCH] mq_timedreceive: 10-2.c: check timeout error rather than invalid parameter error

Akira Takeuchi
2012-03-22T09:36:39Z

Thank you for replying.

On Thu, 22 Mar 2012 16:19:06 +0800
Peng Haitao <penght@cn.fujitsu.com> wrote:

> > On the other hand, actually, timeout error should not be returned when message
> > can be performed immediately.
> >
>
> POSIX spec does not say this, so I think it is not necessary to check timeout error.

Really ? POSIX spec describes as below:

Under no circumstance shall the operation fail with a timeout
if a message can be removed from the message queue immediately.

http://pubs.opengroup.org/onlinepubs/009604499/functions/mq_receive.html

My reading of this is that timeout error must not be returned
when message can be performed immediately. What do you think of it ?

Regards,
Akira Takeuchi