FreeBSD Manual Pages
MQ_GETFD_NP(3) Library Functions Manual MQ_GETFD_NP(3) NAME mq_getfd_np -- get a file descriptor for an open message queue descrip- tor SYNOPSIS POSIX Real-time Library (librt, -lrt) #include <mqueue.h> int mq_getfd_np(mqd_t mqd); DESCRIPTION The mq_getfd_np function retrieves the underlying file descriptor from the given message queue descriptor returned from mq_open(2). The file descriptor is used by other functions to refer to that message queue. The mqd argument must be an open message queue descriptor. IMPLEMENTATION NOTES FreeBSD implements retrieval or alteration of message queue attributes based on the file descriptor. The open file descriptor is copied into a child after fork(2). The fstat(2), fchmod(2), and fchown(2) system calls are supported for the file descriptor. The file descriptor is safe to use so long as the message queue de- scriptor remains open. RETURN VALUES Upon successful completion, the function returns a file descriptor. ERRORS The mq_getfd_np function does not return any errors. SEE ALSO mq_close(2), mq_open(2), mqueuefs(4) HISTORY Support for the mq_getfd_np function first appeared in FreeBSD 11.0. FreeBSD ports 15.quarterly December 18, 2025 MQ_GETFD_NP(3)
NAME | SYNOPSIS | DESCRIPTION | IMPLEMENTATION NOTES | RETURN VALUES | ERRORS | SEE ALSO | HISTORY
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=mq_getfd_np&sektion=3&manpath=FreeBSD+15.1-RELEASE+and+Ports.quarterly>
