Please check the manual page mq_receive(3).