xref: /freebsd/usr.bin/ipcrm/ipcrm.1 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
16cc8c2e2SDoug Rabson.\" Copyright (c) 1994 Adam Glass
26cc8c2e2SDoug Rabson.\" All rights reserved.
36cc8c2e2SDoug Rabson.\"
46cc8c2e2SDoug Rabson.\" Redistribution and use in source and binary forms, with or without
56cc8c2e2SDoug Rabson.\" modification, are permitted provided that the following conditions
66cc8c2e2SDoug Rabson.\" are met:
76cc8c2e2SDoug Rabson.\" 1. Redistributions of source code must retain the above copyright
86cc8c2e2SDoug Rabson.\"    notice, this list of conditions and the following disclaimer.
96cc8c2e2SDoug Rabson.\" 2. The name of the Author may not be used to endorse or promote products
106cc8c2e2SDoug Rabson.\"    derived from this software without specific prior written permission.
116cc8c2e2SDoug Rabson.\"
126cc8c2e2SDoug Rabson.\" THIS SOFTWARE IS PROVIDED BY Adam Glass ``AS IS'' AND
136cc8c2e2SDoug Rabson.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
146cc8c2e2SDoug Rabson.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
156cc8c2e2SDoug Rabson.\" ARE DISCLAIMED.  IN NO EVENT SHALL Adam Glass BE LIABLE
166cc8c2e2SDoug Rabson.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
176cc8c2e2SDoug Rabson.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
186cc8c2e2SDoug Rabson.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
196cc8c2e2SDoug Rabson.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
206cc8c2e2SDoug Rabson.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
216cc8c2e2SDoug Rabson.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
226cc8c2e2SDoug Rabson.\" SUCH DAMAGE.
236cc8c2e2SDoug Rabson.\""
2455e2cb41SEdwin Groothuis.Dd December 12, 2007
25a4cab7d3SMike Pritchard.Dt IPCRM 1
266cc8c2e2SDoug Rabson.Os
276cc8c2e2SDoug Rabson.Sh NAME
286cc8c2e2SDoug Rabson.Nm ipcrm
29f167d7fbSSheldon Hearn.Nd "remove the specified message queues, semaphore sets, and shared segments"
306cc8c2e2SDoug Rabson.Sh SYNOPSIS
311a6abc0fSPhilippe Charnier.Nm
3255e2cb41SEdwin Groothuis.Op Fl W
3355e2cb41SEdwin Groothuis.Op Fl v
346cc8c2e2SDoug Rabson.Op Fl q Ar msqid
356cc8c2e2SDoug Rabson.Op Fl m Ar shmid
366cc8c2e2SDoug Rabson.Op Fl s Ar semid
376cc8c2e2SDoug Rabson.Op Fl Q Ar msgkey
386cc8c2e2SDoug Rabson.Op Fl M Ar shmkey
396cc8c2e2SDoug Rabson.Op Fl S Ar semkey
406cc8c2e2SDoug Rabson.Ar ...
416cc8c2e2SDoug Rabson.Sh DESCRIPTION
42e8937ba0SPhilippe CharnierThe
43e8937ba0SPhilippe Charnier.Nm
44e8937ba0SPhilippe Charnierutility removes the specified message queues, semaphores and shared memory
456a3e8b0aSRuslan Ermilovsegments.
466a3e8b0aSRuslan ErmilovThese System V IPC objects can be specified by their
4728842b57SRuslan Ermilovcreation ID or any associated key.
486cc8c2e2SDoug Rabson.Pp
4955e2cb41SEdwin GroothuisThe following options are generic:
5055e2cb41SEdwin Groothuis.Bl -tag -width indent
5155e2cb41SEdwin Groothuis.It Fl v
5255e2cb41SEdwin GroothuisIf specified once with -W or with -1 for an object, it will show
5355e2cb41SEdwin Groothuisall removed objects.
5455e2cb41SEdwin GroothuisIf specified twice with -W or with -1 for an objects, it will show
5555e2cb41SEdwin Groothuisall removed objects and all failed removals.
5655e2cb41SEdwin Groothuis.It Fl W
5755e2cb41SEdwin GroothuisTry to wipe all specified message queues, semaphores and shared
5855e2cb41SEdwin Groothuismemory segments.
5955e2cb41SEdwin Groothuis.It Fl y
6055e2cb41SEdwin GroothuisUse the
6155e2cb41SEdwin Groothuis.Xr kvm 3
6255e2cb41SEdwin Groothuisinterface instead of the
6355e2cb41SEdwin Groothuis.Xr sysctl 3
6455e2cb41SEdwin Groothuisinterface to extract the required information.
6555e2cb41SEdwin GroothuisIf
6655e2cb41SEdwin Groothuis.Nm
6755e2cb41SEdwin Groothuisis to operate on the running system,
6855e2cb41SEdwin Groothuisusing
6955e2cb41SEdwin Groothuis.Xr kvm 3
7055e2cb41SEdwin Groothuiswill require read privileges to
7155e2cb41SEdwin Groothuis.Pa /dev/kmem .
7255e2cb41SEdwin Groothuis.El
7355e2cb41SEdwin Groothuis.Pp
7419b74679SPhilippe CharnierThe following options are used to specify which IPC objects will be removed.
7519b74679SPhilippe CharnierAny number and combination of these options can be used:
766cc8c2e2SDoug Rabson.Bl -tag -width indent
776cc8c2e2SDoug Rabson.It Fl q Ar msqid
7828842b57SRuslan ErmilovRemove the message queue associated with the ID
7919b74679SPhilippe Charnier.Ar msqid
806cc8c2e2SDoug Rabsonfrom the system.
816cc8c2e2SDoug Rabson.It Fl m Ar shmid
8228842b57SRuslan ErmilovMark the shared memory segment associated with ID
8319b74679SPhilippe Charnier.Ar shmid
846cc8c2e2SDoug Rabsonfor removal.
856cc8c2e2SDoug RabsonThis marked segment will be destroyed after the last detach.
866cc8c2e2SDoug Rabson.It Fl s Ar semid
8728842b57SRuslan ErmilovRemove the semaphore set associated with ID
8819b74679SPhilippe Charnier.Ar semid
896cc8c2e2SDoug Rabsonfrom the system.
906cc8c2e2SDoug Rabson.It Fl Q Ar msgkey
916cc8c2e2SDoug RabsonRemove the message queue associated with key
9219b74679SPhilippe Charnier.Ar msgkey
936cc8c2e2SDoug Rabsonfrom the system.
946cc8c2e2SDoug Rabson.It Fl M Ar shmkey
956cc8c2e2SDoug RabsonMark the shared memory segment associated with key
9619b74679SPhilippe Charnier.Ar shmkey
976cc8c2e2SDoug Rabsonfor removal.
986cc8c2e2SDoug RabsonThis marked segment will be destroyed after the last detach.
996cc8c2e2SDoug Rabson.It Fl S Ar semkey
1006cc8c2e2SDoug RabsonRemove the semaphore set associated with key
10119b74679SPhilippe Charnier.Ar semkey
1026cc8c2e2SDoug Rabsonfrom the system.
1036cc8c2e2SDoug Rabson.El
1046cc8c2e2SDoug Rabson.Pp
1056cc8c2e2SDoug RabsonThe identifiers and keys associated with these System V IPC objects can be
1066cc8c2e2SDoug Rabsondetermined by using
107d0353b83SRuslan Ermilov.Xr ipcs 1 .
10855e2cb41SEdwin GroothuisIf the identifier or the key is -1, it will remove all these objects.
1096cc8c2e2SDoug Rabson.Sh SEE ALSO
1106cc8c2e2SDoug Rabson.Xr ipcs 1
11155e2cb41SEdwin Groothuis.Sh HISTORY
11255e2cb41SEdwin GroothuisThe wiping of all System V IPC objects was first implemented in
1132fccbf04SGlen Barber.Fx 6.4 No and 7.1.
11455e2cb41SEdwin Groothuis.Sh AUTHORS
115*d51868a3SBaptiste DaroussinThe original author was
116*d51868a3SBaptiste Daroussin.An Adam Glass .
117*d51868a3SBaptiste DaroussinThe wiping of all System V IPC objects was thought up by
118*d51868a3SBaptiste Daroussin.An Callum Gibson
119*d51868a3SBaptiste Daroussinand extended and implemented by
120*d51868a3SBaptiste Daroussin.An Edwin Groothuis .
121