The command ipcrm can be used to remove one or more semaphores, message queues, shared memory or inter-process communication facilities (IPC facilities) from the system. These can be specified either by their identifiers or by the key with which each such IPC facility was created.
The identifiers and keys of IPC facilities can be listed with the help of the ipcs command (ID and KEY output columns). For more information on how a message queue, shared memory or semaphore is removed, refer to the msgctl(), shmctl() and semctl() functions in the manual "C Library Functions for POSIX Applications" [4].
Syntax
ipcrm [ option]... |
(queue) Removes the message queue identified as msgqid from the system and destroys the data structures associated with it. msgqid Identifier of the message queue to be removed.
(queue) Removes the message queue identifier msgkey from the system and destroys the data structures associated with it. msgkey Key of the message queue to be removed.
(memory) Removes the shared memory identified as shmid from the system and destroys the data structures associated with it. shmid Identifier of the shared semaphore set to be removed.
(memory) Removes the shared memory identified as shmkey from the system and destroys the data structures associated with it. shmkey Key with which the shared memory to be removed was created.
(semaphore) Removes the semaphore set identified as semid from the system and destroys the data structures associated with it. semid Identifier of the semaphore set to be removed.
(semaphore) Removes the semaphore set identified as semkey from the system and destroys the data structures associated with it. semkey Key with which the semaphore set to be removed was created. |
Example
Use ipcs to first print a report on the status of the inter-process communication facilities and then remove the message queue with the identifier 40 from the system:
|
See also
ipcs |