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

Peng Haitao
2012-03-22T10:17:06Z

Akira Takeuchi said the following on 2012-3-22 17:36:
>>> 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 ?
>

Yeah.
I am sorry missing it:(

The patch looks good.

--
Best Regards,
Peng

>
> Regards,
> Akira Takeuchi