|
|
1.1 root 1: .TH MSGCTL 3L "630 MTG"
2: .XE "msgctl()"
3: .SH NAME
4: msgctl \- message control operations
5: .SH SYNOPSIS
6: .B #include <message.h>
7: .sp
8: .B int msgctl (msqid, cmd, buf)
9: .br
10: .B long msqid;
11: .br
12: .B int cmd;
13: .br
14: .B struct msqid_ds \(**buf;
15: .SH DESCRIPTION
16: .I Msgctl
17: provides a variety of message control operations as
18: specified by
19: .IR cmd.
20: The following
21: .I cmds
22: are available:
23: .sp
24: .B IPC_STAT
25: .br
26: .RS 6
27: Place the current value of each member of the
28: data structure associated with
29: .I msqid
30: into the structure pointed to by
31: .IR buf .
32: .RE
33: .PP
34: .B IPC_SET
35: .br
36: .RS 6
37: Set the value of the following members of the
38: data structure associated with
39: .I msqid
40: to the corresponding value found in the structure
41: pointed to by
42: .IR buf:
43: .ft B
44: .RS 6
45: msg_qbytes
46: .br
47: cid
48: .br
49: state
50: .ft R
51: .sp
52: .RE
53: The creator process id can be changed.
54: This is done so that when this
55: process is deleted, the queue will be deleted with it.
56: .RE
57: .PP
58: .B IPC_RMID
59: .br
60: .RS 6
61: Remove the message queue identifier specified by
62: .I msqid
63: from the system and destroy the
64: message queue and data structure associated
65: with it. This can be executed by any process.
66: .RE
67: .PP
68: .I Msgctl
69: will fail if one or more of the following are true:
70: .sp
71: .RS 6
72: .I Msqid
73: is not a valid message queue identifier.
74: .sp
75: .I Cmd
76: is not a valid command.
77: .sp
78: .I Cmd
79: is equal to
80: .B IPC_SET
81: and an attempt is being made to increase the value of
82: .B msg_qbytes
83: over
84: .B MAX_BYTES
85: (8192).
86: .RE
87: .P
88: A side effect of \f2msgctl\f1 is that it clears the MSG
89: resource ready condition used by the \f2wait\f1 and \f2own\f1
90: resource functions.
91: .SS Return Value
92: Upon successful completion, a value of 0 is returned.
93: Otherwise, a value of -1 is returned.
94: .PP
95: .SH SEE ALSO
96: msgget(3L), msgop(3L), realtime(3R), resources(3R), structures(3R).
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.