1IPCRM(8)                   Linux Programmer's Manual                  IPCRM(8)
2
3
4

NAME

6       ipcrm - remove a message queue, semaphore set or shared memory id
7

SYNOPSIS

9       ipcrm [ -M key | -m id | -Q key | -q id | -S key | -s id ] ...
10
11       deprecated usage
12
13       ipcrm [ shm | msg | sem ] id ...
14

DESCRIPTION

16       ipcrm  removes  System  V  interprocess communication (IPC) objects and
17       associated data structures from the system.  In order  to  delete  such
18       objects, you must be superuser, or the creator or owner of the object.
19
20       System V IPC objects are of three types: shared memory, message queues,
21       and semaphores.  Deletion of a message queue  or  semaphore  object  is
22       immediate (regardless of whether any process still holds an IPC identi‐
23       fier for the object).  A shared memory object is only removed after all
24       currently  attached  processes have detached (shmdt(2)) the object from
25       their virtual address space.
26
27       Two syntax styles are supported.  The old Linux historical syntax spec‐
28       ifies  a three letter keyword indicating which class of object is to be
29       deleted, followed by one or more IPC identifiers for  objects  of  this
30       type.
31
32       The  SUS-compliant  syntax  allows  the  specification  of zero or more
33       objects of all three types in a single command line, with objects spec‐
34       ified either by key or by identifier. (See below.)  Both keys and iden‐
35       tifiers may be specified in decimal,  hexadecimal  (specified  with  an
36       initial '0x' or '0X'), or octal (specified with an initial '0').
37
38

OPTIONS

40       -M shmkey
41              removes  the shared memory segment created with shmkey after the
42              last detach is performed.
43
44       -m shmid
45              removes the shared memory segment identified by shmid after  the
46              last detach is performed.
47
48       -Q msgkey
49              removes the message queue created with msgkey.
50
51       -q msgid
52              removes the message queue identified by msgid.
53
54       -S semkey
55              removes the semaphore created with semkey.
56
57       -s semid
58              removes the semaphore identified by semid.
59
60       The  details  of the removes are described in msgctl(2), shmctl(2), and
61       semctl(2).  The identifiers and keys may be found by using ipcs(8).
62

NOTES

64       In its first Linux implementation, ipcrm  used  the  deprecated  syntax
65       shown in the SYNOPSIS.  Functionality present in other *nix implementa‐
66       tions of ipcrm has since been  added,  namely  the  ability  to  delete
67       resources  by  key  (not just identifier), and to respect the same com‐
68       mand-line syntax. For backward compatibility  the  previous  syntax  is
69       still supported.
70

SEE ALSO

72       ipcs(8),   msgctl(2),   msgget(2),   semctl(2),  semget(2),  shmctl(2),
73       shmdt(2), shmget(2), ftok(3)
74
75
76
77ipcrm                     last change: 19 March 2002                  IPCRM(8)
Impressum