RTEMS | Need to invalid posix message queue object id when delete mq (!364)

yang zhang (@yang.zhang) gitlab at rtems.org
Thu Jan 23 02:50:39 UTC 2025



yang zhang created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/364

Project:Branches: yang.zhang/rtems:invalidate_msgq_id to rtems/rtos/rtems:main
Author:   yang zhang




## Summary

After unlink and close message queue, when need to delete mq,
should also invalid mq object id.

Otherwise, after mq_open, mq_unlink, mq_close,if call mq_close again,
although the return code is -1, errno is EBADF,it's the wrong return path.
When call _POSIX_Message_queue_Get in mq_close, the the_mq still exists 
which shold not happen, because the the_mq->open_count is zero, so it seems
to be fine.

<!-- Default settings, if it is a dropdown it will set after submission -->

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/364
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250123/fbdb9ca2/attachment.htm>


More information about the bugs mailing list