]>
Commit | Line | Data |
---|---|---|
1d4ad1de | 1 | .\" Copyright 2002 Andre C. Mazzone (linuxdev@karagee.com) |
6dbe3af9 | 2 | .\" May be distributed under the GNU General Public License |
d179d019 | 3 | .TH IPCRM "1" "July 2014" "util-linux" "User Commands" |
6dbe3af9 | 4 | .SH NAME |
d179d019 | 5 | ipcrm \- remove certain IPC resources |
6dbe3af9 | 6 | .SH SYNOPSIS |
6dbe3af9 | 7 | .B ipcrm |
d179d019 BS |
8 | [options] |
9 | .sp | |
9a9ff6bd | 10 | .B ipcrm |
d179d019 | 11 | .RB { shm | msg | sem } |
7a5f441b | 12 | .IR id ... |
1d4ad1de | 13 | .SH DESCRIPTION |
4e1991ac | 14 | .B ipcrm |
63cccae4 KZ |
15 | removes System V interprocess communication (IPC) objects |
16 | and associated data structures from the system. | |
17 | In order to delete such objects, you must be superuser, or | |
18 | the creator or owner of the object. | |
9a9ff6bd | 19 | .PP |
63cccae4 KZ |
20 | System V IPC objects are of three types: shared memory, |
21 | message queues, and semaphores. | |
22 | Deletion of a message queue or semaphore object is immediate | |
23 | (regardless of whether any process still holds an IPC | |
24 | identifier for the object). | |
25 | A shared memory object is only removed | |
26 | after all currently attached processes have detached | |
27 | .RB ( shmdt (2)) | |
28 | the object from their virtual address space. | |
9a9ff6bd | 29 | .PP |
63cccae4 | 30 | Two syntax styles are supported. The old Linux historical syntax specifies |
4e1991ac | 31 | a three-letter keyword indicating which class of object is to be deleted, |
63cccae4 | 32 | followed by one or more IPC identifiers for objects of this type. |
9a9ff6bd | 33 | .PP |
63cccae4 KZ |
34 | The SUS-compliant syntax allows the specification of |
35 | zero or more objects of all three types in a single command line, | |
4e1991ac | 36 | with objects specified either by key or by identifier (see below). |
63cccae4 KZ |
37 | Both keys and identifiers may be specified in decimal, hexadecimal |
38 | (specified with an initial '0x' or '0X'), or octal (specified with | |
39 | an initial '0'). | |
5e43af7e BS |
40 | .PP |
41 | The details of the removes are described in | |
42 | .BR shmctl (2), | |
43 | .BR msgctl (2), | |
44 | and | |
45 | .BR semctl (2). | |
46 | The identifiers and keys can be found by using | |
47 | .BR ipcs (1). | |
1d4ad1de | 48 | .SH OPTIONS |
1d4ad1de | 49 | .TP |
5e43af7e BS |
50 | \fB-a\fR, \fB\-\-all\fR [\fBshm\fR] [\fBmsg\fR] [\fBsem\fR] |
51 | Remove all resources. When an option argument is provided, the removal is | |
52 | performed only for the specified resource types. \fIWarning!\fR Do not use | |
53 | .B \-a | |
54 | if you are unsure how the software using the resources might react to missing | |
55 | objects. Some programs create these resources at startup and may not have | |
56 | any code to deal with an unexpected disappearance. | |
57 | .TP | |
b06c1ca6 | 58 | .BR \-M , " \-\-shmem\-key " \fIshmkey |
4e1991ac | 59 | Remove the shared memory segment created with |
63cccae4 KZ |
60 | .I shmkey |
61 | after the last detach is performed. | |
1d4ad1de | 62 | .TP |
b06c1ca6 | 63 | .BR \-m , " \-\-shmem\-id " \fIshmid |
4e1991ac | 64 | Remove the shared memory segment identified by |
1d4ad1de | 65 | .I shmid |
63cccae4 | 66 | after the last detach is performed. |
1d4ad1de | 67 | .TP |
b06c1ca6 | 68 | .BR \-Q , " \-\-queue\-key " \fImsgkey |
4e1991ac | 69 | Remove the message queue created with |
63cccae4 | 70 | .IR msgkey . |
1d4ad1de | 71 | .TP |
b06c1ca6 | 72 | .BR \-q , " \-\-queue\-id " \fImsgid |
4e1991ac | 73 | Remove the message queue identified by |
63cccae4 | 74 | .IR msgid . |
1d4ad1de | 75 | .TP |
b06c1ca6 | 76 | .BR \-S , " \-\-semaphore\-key " \fIsemkey |
4e1991ac | 77 | Remove the semaphore created with |
63cccae4 KZ |
78 | .IR semkey . |
79 | .TP | |
b06c1ca6 | 80 | .BR \-s , " \-\-semaphore\-id " \fIsemid |
4e1991ac | 81 | Remove the semaphore identified by |
63cccae4 | 82 | .IR semid . |
3d0fc72d | 83 | .TP |
5e43af7e BS |
84 | .BR \-V , " \-\-version" |
85 | Display version information and exit. | |
86 | .TP | |
87 | .BR \-h , " \-\-help" | |
88 | Display help text and exit. | |
1d4ad1de | 89 | .SH NOTES |
4e1991ac | 90 | In its first Linux implementation, \fBipcrm\fR used the deprecated syntax |
d179d019 | 91 | shown in the second line of the |
1d4ad1de | 92 | .BR SYNOPSIS . |
4e1991ac | 93 | Functionality present in other *nix implementations of \fBipcrm\fR has since |
1d4ad1de | 94 | been added, namely the ability to delete resources by key (not just |
4e1991ac | 95 | identifier), and to respect the same command-line syntax. For backward |
1d4ad1de | 96 | compatibility the previous syntax is still supported. |
63cccae4 KZ |
97 | .\" .SH AUTHORS |
98 | .\" Andre C. Mazzone (linuxdev@karagee.com) | |
99 | .\" .br | |
100 | .\" Krishna Balasubramanian (balasub@cis.ohio-state.edu) | |
6dbe3af9 | 101 | .SH SEE ALSO |
63cccae4 | 102 | .nh |
2ccebfe8 | 103 | .BR ipcs (1), |
1b3f1330 | 104 | .BR ipcmk (1), |
1d4ad1de KZ |
105 | .BR msgctl (2), |
106 | .BR msgget (2), | |
107 | .BR semctl (2), | |
108 | .BR semget (2), | |
109 | .BR shmctl (2), | |
63cccae4 KZ |
110 | .BR shmdt (2), |
111 | .BR shmget (2), | |
112 | .BR ftok (3) | |
86d62711 | 113 | .SH AVAILABILITY |
601d12fb | 114 | The ipcrm command is part of the util-linux package and is available from |
9a9ff6bd SK |
115 | .UR ftp://\:ftp.kernel.org\:/pub\:/linux\:/utils\:/util-linux/ |
116 | Linux Kernel Archive | |
117 | .UE . |