|
|
1.1 root 1:
2:
3: msgctl() COHERENT System Call msgctl()
4:
5:
6:
7:
8: Message control operations
9:
10: #include <sys/msg.h>
11: iinntt mmssggccttll(_m_s_q_i_d, _c_m_d, _b_u_f)
12: iinntt _m_s_q_i_d; iinntt _c_m_d; ssttrruucctt mmssqqiidd_ddss *_b_u_f;
13:
14: msgctl performs the message-control operations specified by cmd.
15: The following cmds are available:
16:
17: IIPPCC_SSTTAATT Place the current value of each member of the data
18: structure associated with msqid into the structure
19: pointed to by buf.
20:
21: IIPPCC_SSEETT Set the value of the following members of the data
22: structure associated with msqid to the corresponding
23: value found in the structure pointed to by buf:
24:
25: msg_perm.uid
26: msg_perm.gid
27: msg_perm.mode /* only low 9 bits */
28: msg_qbytes
29:
30: This cmd can only be executed by a process that has an
31: effective-user identifier equal to either that of su-
32: peruser or to the value of msg_perm.uid in the data
33: structure associated with msqid. Only superuser can
34: raise the value of msg_qbytes.
35:
36: IIPPCC_RRMMIIDD Remove the system identifier specified by msqid from
37: the system and destroy the message queue and data
38: structure associated with it. This cmd can only be ex-
39: ecuted by a process that has an effective-user iden-
40: tifier equal to either that of superuser or to the
41: value of msg_perm.uid in the data structure associated
42: with msqid.
43:
44: msgctl fails if any of the following are true:
45:
46: * msqid is not a valid message queue identifier. msgctl sets
47: the global variable errno to EINVAL.
48:
49: * cmd is not a valid command (EEIINNVVAALL).
50:
51: * cmd is equal to IPC_STAT and operation permission is denied to
52: the calling process (EEAACCCCEESS).
53:
54: * cmd is equal to IPC_RMID or IPC_SET, and the effective-user
55: identifier of the calling process is not equal to that of su-
56: peruser and it is not equal to the value of msg_perm.uid in
57: the data structure associated with msqid (EEPPEERRMM).
58:
59: * cmd is equal to IPC_SET, an attempt is being made to increase
60: to the value of msg_qbytes, and the effective-user identifier
61: of the calling process is not equal to that of super user
62:
63:
64: COHERENT Lexicon Page 1
65:
66:
67:
68:
69: msgctl() COHERENT System Call msgctl()
70:
71:
72:
73: (EEPPEERRMM).
74:
75: * buf points to an illegal address (EEFFAAUULLTT).
76:
77: ***** Return Value *****
78:
79: Upon successful completion, msgctl returns zero. If a problem
80: occurs, it returns -1 and sets eerrrrnnoo to an appropriate value.
81:
82: ***** Files *****
83:
84: /usr/include/sys/ipc.h
85: /usr/include/sys/msg.h
86: /dev/msg
87:
88: ***** See Also *****
89:
90: COHERENT system calls, msg, msgget(), msgrcv(), msgsnd()
91:
92: ***** Notes *****
93:
94: To improve portability, COHERENT implements the mmssgg functions as
95: a device driver rather than as an actual system call.
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130: COHERENT Lexicon Page 2
131:
132:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.