OSDN Git Service

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