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