Date: Sun, 8 May 2005 14:18:47 -0500 From: Dan Nelson <dnelson@allantgroup.com> To: ChenMing <chenm@huawei.com> Cc: freebsd-hackers@freebsd.org Subject: Re: doubt: msgrcv not return EAGAIN? Message-ID: <20050508191846.GA38839@dan.emsphone.com> In-Reply-To: <0IG400A5VLW94V@szxml01-in.huawei.com> References: <0IG400A5VLW94V@szxml01-in.huawei.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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@allantgroup.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050508191846.GA38839>