Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 07 May 2005 23:26:43 +0800
From:      ChenMing <chenm@huawei.com>
To:        freebsd-hackers@freebsd.org
Subject:   doubt: msgrcv not return EAGAIN?
Message-ID:  <0IG400A5VLW94V@szxml01-in.huawei.com>

next in thread | raw e-mail | index | archive | help

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 my expected. It never return errno=EAGAIN,
however it return errno=ENOMSG instead, but msgrcv manual say its should
return EAGAIN. what's wrong?

thanks in advanced.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0IG400A5VLW94V>