]> git.ipfire.org Git - thirdparty/util-linux.git/blame - sys-utils/ipcrm.8
Imported from util-linux-2.11t tarball.
[thirdparty/util-linux.git] / sys-utils / ipcrm.8
CommitLineData
1d4ad1de 1.\" Copyright 2002 Andre C. Mazzone (linuxdev@karagee.com)
6dbe3af9 2.\" May be distributed under the GNU General Public License
1d4ad1de 3.TH IPCRM 8 "last change: 19 March 2002" "ipcrm" "Linux Programmer's Manual"
6dbe3af9 4.SH NAME
1d4ad1de 5ipcrm \- remove a message queue, semaphore set or shared memory id
6dbe3af9 6.SH SYNOPSIS
6dbe3af9 7.B ipcrm
1d4ad1de 8[
63cccae4
KZ
9.B \-M
10.I key
11|
12.B \-m
13.I id
14|
15.B \-Q
16.I key
17|
18.B \-q
19.I id
20|
21.B \-S
22.I key
23|
24.B \-s
25.I id
26] ...
1d4ad1de
KZ
27
28deprecated usage
29
30.BI ipcrm
31[
63cccae4 32.B shm
1d4ad1de 33|
63cccae4 34.B msg
1d4ad1de 35|
63cccae4 36.B sem
1d4ad1de 37]
63cccae4 38.IR id " ..."
1d4ad1de
KZ
39.SH DESCRIPTION
40.I ipcrm
63cccae4
KZ
41removes System V interprocess communication (IPC) objects
42and associated data structures from the system.
43In order to delete such objects, you must be superuser, or
44the creator or owner of the object.
45
46System V IPC objects are of three types: shared memory,
47message queues, and semaphores.
48Deletion of a message queue or semaphore object is immediate
49(regardless of whether any process still holds an IPC
50identifier for the object).
51A shared memory object is only removed
52after all currently attached processes have detached
53.RB ( shmdt (2))
54the object from their virtual address space.
55
56Two syntax styles are supported. The old Linux historical syntax specifies
57a three letter keyword indicating which class of object is to be deleted,
58followed by one or more IPC identifiers for objects of this type.
59
60The SUS-compliant syntax allows the specification of
61zero or more objects of all three types in a single command line,
62with objects specified either by key or by identifier. (See below.)
63Both keys and identifiers may be specified in decimal, hexadecimal
64(specified with an initial '0x' or '0X'), or octal (specified with
65an initial '0').
66
1d4ad1de 67.SH OPTIONS
1d4ad1de 68.TP
63cccae4
KZ
69.BI \-M " shmkey"
70removes the shared memory segment created with
71.I shmkey
72after the last detach is performed.
1d4ad1de
KZ
73.TP
74.BI \-m " shmid"
75removes the shared memory segment identified by
76.I shmid
63cccae4 77after the last detach is performed.
1d4ad1de
KZ
78.TP
79.BI \-Q " msgkey"
80removes the message queue created with
63cccae4 81.IR msgkey .
1d4ad1de 82.TP
63cccae4
KZ
83.BI \-q " msgid"
84removes the message queue identified by
85.IR msgid .
1d4ad1de
KZ
86.TP
87.BI \-S " semkey"
88removes the semaphore created with
63cccae4
KZ
89.IR semkey .
90.TP
91.BI \-s " semid"
92removes the semaphore identified by
93.IR semid .
1d4ad1de
KZ
94.LP
95The details of the removes are described in
96.IR msgctl (2),
97.IR shmctl (2),
98and
99.IR semctl (2).
100The identifiers and keys may be found by using
101.IR ipcs (8).
102.SH NOTES
63cccae4
KZ
103In its first Linux implementation, ipcrm used the deprecated syntax
104shown in the
1d4ad1de
KZ
105.BR SYNOPSIS .
106Functionality present in other *nix implementations of ipcrm has since
107been added, namely the ability to delete resources by key (not just
108identifier), and to respect the same command-line syntax. For backward
109compatibility the previous syntax is still supported.
63cccae4
KZ
110.\" .SH AUTHORS
111.\" Andre C. Mazzone (linuxdev@karagee.com)
112.\" .br
113.\" Krishna Balasubramanian (balasub@cis.ohio-state.edu)
6dbe3af9 114.SH SEE ALSO
63cccae4 115.nh
1d4ad1de
KZ
116.BR ipcs (8),
117.BR msgctl (2),
118.BR msgget (2),
119.BR semctl (2),
120.BR semget (2),
121.BR shmctl (2),
63cccae4
KZ
122.BR shmdt (2),
123.BR shmget (2),
124.BR ftok (3)