2019-04-21 11:50:48 +08:00

19 lines
1.7 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1 id="ipcrm">ipcrm</h1>
<p>删除消息队列、信号集、或者共享内存标识</p>
<h2 id="补充说明">补充说明</h2>
<p><strong>ipcrm命令</strong> 用来删除一个或更多的消息队列、信号量集或者共享内存标识。</p>
<h3 id="语法">语法</h3>
<pre><code class="language-bash">ipcrm [ -m SharedMemoryID ] [ -M SharedMemoryKey ] [ -q MessageID ] [ -Q MessageKey ] [ -s SemaphoreID ] [ -S SemaphoreKey ]</code></pre>
<h3 id="选项">选项</h3>
<pre><code class="language-bash">-m SharedMemory id 删除共享内存标识 SharedMemoryID。与 SharedMemoryID 有关联的共享内存段以及数据结构都会在最后一次拆离操作后删除。
-M SharedMemoryKey 删除用关键字 SharedMemoryKey 创建的共享内存标识。与其相关的共享内存段和数据结构段都将在最后一次拆离操作后删除。
-q MessageID 删除消息队列标识 MessageID 和与其相关的消息队列和数据结构。
-Q MessageKey 删除由关键字 MessageKey 创建的消息队列标识和与其相关的消息队列和数据结构。
-s SemaphoreID 删除信号量标识 SemaphoreID 和与其相关的信号量集及数据结构。
-S SemaphoreKey 删除由关键字 SemaphoreKey 创建的信号标识和与其相关的信号量集和数据结构。</code></pre>
<p>msgctl、shmctl 和 semctl 子例程提供了删除操作的细节。标识和关键字可以用 ipcs 命令找到。</p>
<h3 id="示例">示例</h3>
<p>如果要删除和 SharedMemoryID 18602 相关的共享内存段,请输入:</p>
<pre><code class="language-bash">ipcrm -m 18602</code></pre>
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->