doubt: msgrcv not return EAGAIN?

2005-05-08 Thread ChenMing
hello, hackers. 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

Re: doubt: msgrcv not return EAGAIN?

2005-05-08 Thread Dan Nelson
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