58 lines
2.4 KiB
HTML
58 lines
2.4 KiB
HTML
<html><!-- This HTML file has been created by texi2html 1.29
|
|
from syscalls.texi on 4 June 1994 -->
|
|
|
|
<TITLE>Syscall specifications of Linux - msgctl</TITLE>
|
|
<P>Go to the <A HREF="syscalls_73.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_73.html">previous</A>, <A HREF="syscalls_75.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_75.html">next</A> section.<P>
|
|
<H2><A NAME="SEC74" HREF="syscalls_toc.html#SEC74" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_toc.html#SEC74">msgctl</A></H2>
|
|
<P>
|
|
<H3>SYNOPSIS</H3>
|
|
<P>
|
|
<CODE>int msgctl(int <VAR>msqid</VAR>,int <VAR>cmd</VAR>,struct msqid_ds *<VAR>buf</VAR>);</CODE>
|
|
<P>
|
|
<H3>PARAMETERS</H3>
|
|
<P>
|
|
<VAR>msqid</VAR>: [in] the message queue to manipulate.
|
|
<P>
|
|
<VAR>cmd</VAR>: [in] the operation to perform on the message queue.
|
|
<P>
|
|
<VAR>buf</VAR>: the interpretation of this parameter depends on <VAR>cmd</VAR>.
|
|
<P>
|
|
<H3>DESCRIPTION</H3>
|
|
<P>
|
|
Manipulates a message queue. <VAR>cmd</VAR> may be one of:
|
|
<P>
|
|
<DL COMPACT>
|
|
<DT><CODE>IPC_STAT</CODE>
|
|
<DD>retreives some information on the queue.
|
|
<P>
|
|
<DT><CODE>IPC_SET</CODE>
|
|
<DD>modify some operating parameters of the queue. <VAR>buf</VAR> points to a
|
|
<CODE>msqid_ds</CODE> structure. The only modifiable parameters are:
|
|
<CODE>msg_perm.uid</CODE>, <CODE>msg_perm.gid</CODE>, <CODE>msg_perm.mode</CODE> (only
|
|
lowest 9 bits) and <CODE>msg_qbytes</CODE>. The calling task uid must be one
|
|
of the creator uid or the owner uid of the queue or the superuser uid.
|
|
Only the superuser may rise <CODE>msg_qbytes</CODE> beyond the system limit of
|
|
<CODE>MSGMNB</CODE>.
|
|
<P>
|
|
<DT><CODE>IPC_RMID</CODE>
|
|
<DD>immediately destroys the message queue and awake all sleaping reader and
|
|
writer processes.
|
|
</DL>
|
|
<P>
|
|
<H3>RETURN VALUE</H3>
|
|
<P>
|
|
On success zero is returned. On error -1 is returned and <CODE>errno</CODE> is
|
|
set to one of the following values:
|
|
<P>
|
|
<UL>
|
|
<LI><CODE>EACCESS</CODE>: the caller tried <CODE>IPC_STAT</CODE> but does not have
|
|
read permission on the queue.
|
|
<LI><CODE>EIDRM</CODE>: the queue is already removed.
|
|
<LI><CODE>EINVAL</CODE>: invalid value for <VAR>cmd</VAR> or <VAR>msqid</VAR>.
|
|
<LI><CODE>EPERM</CODE>: the taks tried an operation for which it does not
|
|
have the necessary privileges.
|
|
<LI><CODE>EFAULT</CODE>.
|
|
</UL>
|
|
<P>
|
|
<P>Go to the <A HREF="syscalls_73.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_73.html">previous</A>, <A HREF="syscalls_75.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_75.html">next</A> section.<P>
|