mirror of https://github.com/mkerrisk/man-pages
101 lines
2.4 KiB
Plaintext
101 lines
2.4 KiB
Plaintext
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
|
|
.TH "<sys/ipc.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
|
|
.\" <sys/ipc.h>
|
|
.SH NAME
|
|
sys/ipc.h \- XSI interprocess communication access structure
|
|
.SH SYNOPSIS
|
|
.LP
|
|
\fB#include <sys/ipc.h> \fP
|
|
.SH DESCRIPTION
|
|
.LP
|
|
The \fI<sys/ipc.h>\fP header is used by three mechanisms for XSI interprocess
|
|
communication (IPC): messages, semaphores,
|
|
and shared memory. All use a common structure type, \fBipc_perm\fP,
|
|
to pass information used in determining permission to perform
|
|
an IPC operation.
|
|
.LP
|
|
The \fBipc_perm\fP structure shall contain the following members:
|
|
.sp
|
|
.RS
|
|
.nf
|
|
|
|
\fBuid_t uid \fP Owner's user ID. \fB
|
|
gid_t gid \fP Owner's group ID. \fB
|
|
uid_t cuid \fP Creator's user ID. \fB
|
|
gid_t cgid \fP Creator's group ID. \fB
|
|
mode_t mode \fP Read/write permission. \fB
|
|
\fP
|
|
.fi
|
|
.RE
|
|
.LP
|
|
The \fBuid_t\fP, \fBgid_t\fP, \fBmode_t\fP, and \fBkey_t\fP types
|
|
shall be defined as described in \fI<sys/types.h>\fP .
|
|
.LP
|
|
Definitions shall be provided for the following constants:
|
|
.LP
|
|
Mode bits:
|
|
.TP 7
|
|
IPC_CREAT
|
|
Create entry if key does not exist.
|
|
.TP 7
|
|
IPC_EXCL
|
|
Fail if key exists.
|
|
.TP 7
|
|
IPC_NOWAIT
|
|
Error if request must wait.
|
|
.sp
|
|
.LP
|
|
Keys:
|
|
.TP 7
|
|
IPC_PRIVATE
|
|
Private key.
|
|
.sp
|
|
.LP
|
|
Control commands:
|
|
.TP 7
|
|
IPC_RMID
|
|
Remove identifier.
|
|
.TP 7
|
|
IPC_SET
|
|
Set options.
|
|
.TP 7
|
|
IPC_STAT
|
|
Get options.
|
|
.sp
|
|
.LP
|
|
The following shall be declared as a function and may also be defined
|
|
as a macro. A function prototype shall be provided.
|
|
.sp
|
|
.RS
|
|
.nf
|
|
|
|
\fBkey_t ftok(const char *, int);
|
|
\fP
|
|
.fi
|
|
.RE
|
|
.LP
|
|
\fIThe following sections are informative.\fP
|
|
.SH APPLICATION USAGE
|
|
.LP
|
|
None.
|
|
.SH RATIONALE
|
|
.LP
|
|
None.
|
|
.SH FUTURE DIRECTIONS
|
|
.LP
|
|
None.
|
|
.SH SEE ALSO
|
|
.LP
|
|
\fI<sys/types.h>\fP , the System Interfaces volume of
|
|
IEEE\ Std\ 1003.1-2001, \fIftok\fP()
|
|
.SH COPYRIGHT
|
|
Portions of this text are reprinted and reproduced in electronic form
|
|
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
|
|
-- Portable Operating System Interface (POSIX), The Open Group Base
|
|
Specifications Issue 6, Copyright (C) 2001-2003 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 .
|