sys_msg.h(0P)
π sys_msg.h(0P) π
okay bestie, so this is the manual page for sys_msg.h, and it lives in the POSIX Programmer's Manual. we're in the 0P girlies today. π
πΈ PROLOG πΈ
okay so before literally anything else: this manual page is part of the POSIX Programmer's Manual. but heads up β the Linux implementation of this interface may differ (so if you're on Linux, go consult the corresponding Linux manual page for the actual deets), or honestly the interface may not be implemented on Linux at all. vibe check your platform first, bestie. π
β¨ NAME β¨
sys/msg.h β XSI message queue structures. that's it, that's the whole name. iconic.
π¦ SYNOPSIS π¦
#include <sys/msg.h>
π DESCRIPTION π
so the <sys/msg.h> header shall define the following data types through typedef:
msgqnum_tβ used for the number of messages in the message queue. πmsglen_tβ used for the number of bytes allowed in a message queue.
and these types shall be unsigned integer types that are able to store values at least as large as a type unsigned short. no cap.
next up, the <sys/msg.h> header shall define the following symbolic constant as a message operation flag:
MSG_NOERRORβ no error if big message. (yes that's literally how it's phrased, she's short and sweet and she ate. π )
and then the <sys/msg.h> header shall define the msqid_ds structure, which shall include these members:
struct ipc_perm msg_perm Operation permission structure.
msgqnum_t msg_qnum Number of messages currently on queue.
msglen_t msg_qbytes Maximum number of bytes allowed on queue.
pid_t msg_lspid Process ID of last msgsnd().
pid_t msg_lrpid Process ID of last msgrcv().
time_t msg_stime Time of last msgsnd().
time_t msg_rtime Time of last msgrcv().
time_t msg_ctime Time of last change.
so real quick, translating the vibes:
msg_permis the operation permission structure π«Άmsg_qnumis how many messages are currently chillin' on the queuemsg_qbytesis the max number of bytes allowed on the queuemsg_lspidis the process ID of the lastmsgsnd()msg_lrpidis the process ID of the lastmsgrcv()msg_stimeis the time of the lastmsgsnd()msg_rtimeis the time of the lastmsgrcv()msg_ctimeis the time of the last change
also, the <sys/msg.h> header shall define the pid_t, size_t, ssize_t, and time_t types as described in <sys/types.h>. go read that one too, iykyk. π
the following shall be declared as functions and may also be defined as macros. function prototypes shall be provided. π
int msgctl(int, int, struct msqid_ds *);
int msgget(key_t, int);
ssize_t msgrcv(int, void *, size_t, long, int);
int msgsnd(int, const void *, size_t, int);
and in addition, the <sys/msg.h> header shall include the <sys/ipc.h> header. she brings her friend everywhere, we love a supportive queen. π§
the following sections are informative. (translation: they're the bonus content, not the requirements. π)
π APPLICATION USAGE π
none. literally nothing. the void. π³οΈ
π RATIONALE π
none. also the void. π
β FUTURE DIRECTIONS β
none. the void continues. but make it slay. β¨
π SEE ALSO π
<sys_ipc.h><sys_types.h>- The System Interfaces volume of POSIX.1β2017:
msgctl(),msgget(),msgrcv(),msgsnd()
π COPYRIGHT π
okay this part is the serious bit so listen up bestie, no jokes here:
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
and that's the whole page, babe π«Ά this edition was brought to you by IEEE/The Open Group, dated 2017, and the page is sys_msg.h(0P). go forth and queue those messages, main character. π
πΈ
π¦ where this page comes from
- alpine 3.22: man-pages-posix 2017a-r0 Β· custom
- alpine 3.23: man-pages-posix 2017a-r0 Β· custom
- alpine 3.24: man-pages-posix 2017a-r0 Β· custom
- arch rolling: man-pages 6.19-1
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages-posix 2017a
- opensuse-leap 16.0: man-pages-posix 2017a-160000.4.1 Β· SUSE-IEEE
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms