⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 msgctl.2

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 2
字号:
.\" SCCSID: @(#)msgctl.2	8.1	9/11/90.TH msgctl 2.SH Namemsgctl \- message control operations.SH Syntax.nf#include <\fIsys/types.h\fP>#include <\fIsys/ipc.h\fP>#include <\fIsys/msg.h\fP>.PPint msgctl (\fImsqid, cmd, buf\fP)int \fImsqid, cmd\fP;struct \fImsqid_ds, buf\fP;.fi.SH Description.NXR "msgctl system call".NXR "msgctl system call" "msgget system call".NXR "msgctl system call" "msgsnd system call".NXR "message" "control operations"The.PN msgctlsystem callprovides message control operations as specified by.I cmd.The following.I cmdsare available:.TP 15IPC_STATPlace the current value of each memberof the data structure associated with.I msqidinto the structure pointed to by.I buf.The contents of this structure are defined in .MS intro 2 ..TP 15IPC_SETSet the value of the following members of the data structureassociated with.I msqidto the corresponding value found in the structurepointed to by.IR buf :.EXmsg_perm.uidmsg_perm.gidmsg_perm.mode	/* only low 9 bits */msg_qbytes.EE.PPThis.I cmdcan be executed only by a process that has an effective user IDthat is equal to superuser or the value of either.I msg_perm.uidor.I msg_perm.cuidin the data structure associated with.IR msqid.Only the superuser can raise the value of.IR msg_qbytes..RE.TP 15IPC_RMIDRemove the message queue identifier specified by.I msqidfrom the system and destroy the message queueand data structure associated with it. This command can only be executedby a process that has an effectiveuser ID equal to either that of the superuser or to the value of.I msg_perm.uidin the data structure associated with.IR msquid..SH Return ValuesUpon successful completion, a value of 0 is returned.Otherwise, a value of \-1 is returned and.I errnois set to indicate the error..SH DiagnosticsThe.PN msgctlsystem callfails under the following conditions:.TP 15[EINVAL]The.I msqidis not a valid message queue identifier..TP 15[EINVAL]The.I cmdis not a valid command..TP 15[EACCES]The.I cmdis equal to IPC_STATand read operation permission is denied tothe calling process.  For further information, see .MS intro 2 ..TP 15[EPERM]The.I cmdis equal to IPC_RMIDor IPC_SETand the effective user ID of thecalling process is not equal to that ofthe superuser or to the value of.I msg_perm.uidin the data structure associated with.IR msqid..TP 15[EPERM]The.I cmdis equal to IPC_SET,an attempt is being made to increase to thevalue of.IR msg_qbytes,and the effective user ID of the calling process isnot equal to that of superuser..TP 15[EFAULT]The.I bufpoints to an illegal address..SH See Alsomsgget(2), msgop(2)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -