doubt: msgrcv not return EAGAIN?
Dan Nelson
dnelson at allantgroup.com
Sun May 8 12:18:50 PDT 2005
In the last episode (May 07), ChenMing said:
> I use following line to recive message from message queue:
>
> int ret;
> ret = msgrcv(msgid, &msg, sizeof(msg), 0, IPC_NOWAIT) if (ret == -1) {
> if (errno == EAGAIN){
> // no message in queue
> }
> else{
> // here is an error occur
> }
> }
>
> but it sounds not works as my expected. It never return errno=EAGAIN,
> however it return errno=ENOMSG instead, but msgrcv manual say its
> should return EAGAIN. what's wrong?
I think the manpage is incorrect.
--
Dan Nelson
dnelson at allantgroup.com
More information about the freebsd-hackers
mailing list