This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Unwarranted assumption in tst-waitid, or a kernel bug?
> Well. Until today I knew absolutely nothing about ipc/mqueue.c, so you
> shouldn't trust me (and in fact I spent some time trying to find the
> implementation of mq_send/etc in glibc's sources ;)
I haven't really looked at mq stuff before either.
Jakub wrote this test, so maybe he can explain some of its intents.
> However. I can easily misinterpret this code, but it seems that
> sys_mq_timedsend() doesn't necessarily sends a signal if the caller
> of sys_mq_timedreceive() already sleeps ?
That's correct. And that's what POSIX says it should do (under mq_notify):
If a process has registered for notification of message arrival
at a message queue and some thread is blocked in mq_receive() or
mq_timedreceive() waiting to receive a message when a message
arrives at the queue, the arriving message shall satisfy the
appropriate mq_receive() or mq_timedreceive(), respectively. The
resulting behavior is as if the message queue remains empty, and
no notification shall be sent.
Thanks,
Roland