<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/book.swoole.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'class.swoole-process.php',
    1 => 'Swoole\\Process',
    2 => 'The Swoole\\Process class',
  ),
  'up' => 
  array (
    0 => 'book.swoole.php',
    1 => 'Swoole',
  ),
  'prev' => 
  array (
    0 => 'class.swoole-mysql-exception.php',
    1 => 'Swoole\\MySQL\\Exception',
  ),
  'next' => 
  array (
    0 => 'swoole-process.alarm.php',
    1 => 'Swoole\\Process::alarm',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/swoole/swoole.process.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/class.swoole-process.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="class.swoole-process" class="reference">

 <h1 class="title">The Swoole\Process class</h1>
 

 <div class="partintro"><p class="verinfo">(PECL swoole &gt;= 1.9.0)</p>


  <div class="section" id="swoole-process.intro">
   <h2 class="title">简介</h2>
   <p class="para">

   </p>
  </div>


  <div class="section" id="swoole-process.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <span class="ooclass"><strong class="classname"></strong></span>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <span class="modifier">class</span> <strong class="classname">Swoole\Process</strong>
     </span>
     {</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 常量 */</div>
    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.swoole-process.php#swoole-process.constants.ipc-nowait"><var class="varname">IPC_NOWAIT</var></a></var><span class="initializer"> = 256</span>;</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="swoole-process.alarm.php" class="methodname">alarm</a></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$interval_usec</code></span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="swoole-process.close.php" class="methodname">close</a></span>(): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="swoole-process.daemon.php" class="methodname">daemon</a></span>(<span class="methodparam"><span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span> <code class="parameter">$nochdir</code><span class="initializer"> = ?</span></span>, <span class="methodparam"><span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span> <code class="parameter">$noclose</code><span class="initializer"> = ?</span></span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="swoole-process.destruct.php" class="methodname">__destruct</a></span>(): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="swoole-process.exec.php" class="methodname">exec</a></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$exec_file</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$args</code></span>): <span class="type">ReturnType</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="swoole-process.exit.php" class="methodname">exit</a></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$exit_code</code><span class="initializer"> = ?</span></span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="swoole-process.freequeue.php" class="methodname">freeQueue</a></span>(): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="swoole-process.kill.php" class="methodname">kill</a></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$pid</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$signal_no</code><span class="initializer"> = ?</span></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="swoole-process.name.php" class="methodname">name</a></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$process_name</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="swoole-process.pop.php" class="methodname">pop</a></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$maxsize</code><span class="initializer"> = ?</span></span>): <span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="swoole-process.push.php" class="methodname">push</a></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$data</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="swoole-process.read.php" class="methodname">read</a></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$maxsize</code><span class="initializer"> = ?</span></span>): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="swoole-process.signal.php" class="methodname">signal</a></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$signal_no</code></span>, <span class="methodparam"><span class="type"><a href="language.types.callable.php" class="type callable">callable</a></span> <code class="parameter">$callback</code></span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="swoole-process.start.php" class="methodname">start</a></span>(): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="swoole-process.statqueue.php" class="methodname">statQueue</a></span>(): <span class="type"><a href="language.types.array.php" class="type array">array</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="swoole-process.usequeue.php" class="methodname">useQueue</a></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$key</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$mode</code><span class="initializer"> = ?</span></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="swoole-process.wait.php" class="methodname">wait</a></span>(<span class="methodparam"><span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span> <code class="parameter">$blocking</code><span class="initializer"> = ?</span></span>): <span class="type"><a href="language.types.array.php" class="type array">array</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="swoole-process.write.php" class="methodname">write</a></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$data</code></span>): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>

   }</div>


  </div>


  <div class="section" id="swoole-process.constants">
   <h2 class="title">预定义常量</h2>
   <dl>

    
     <dt id="swoole-process.constants.ipc-nowait"><strong><code><a href="class.swoole-process.php#swoole-process.constants.ipc-nowait">Swoole\Process::IPC_NOWAIT</a></code></strong></dt>
     <dd>
      <p class="para"/>
     </dd>
    

   </dl>
  </div>



 </div>

 





































































































































<h2>目录</h2><ul class="chunklist chunklist_reference"><li><a href="swoole-process.alarm.php">Swoole\Process::alarm</a> — High precision timer which triggers signal with fixed interval.</li><li><a href="swoole-process.close.php">Swoole\Process::close</a> — Close the pipe to the child process.</li><li><a href="swoole-process.construct.php">Swoole\Process::__construct</a> — Construct a process.</li><li><a href="swoole-process.daemon.php">Swoole\Process::daemon</a> — Change the process to be a daemon process.</li><li><a href="swoole-process.destruct.php">Swoole\Process::__destruct</a> — Destroy the process.</li><li><a href="swoole-process.exec.php">Swoole\Process::exec</a> — Execute system commands.</li><li><a href="swoole-process.exit.php">Swoole\Process::exit</a> — Stop the child processes.</li><li><a href="swoole-process.freequeue.php">Swoole\Process::freeQueue</a> — Destroy the message queue created by swoole_process::useQueue.</li><li><a href="swoole-process.kill.php">Swoole\Process::kill</a> — Send signal to the child process.</li><li><a href="swoole-process.name.php">Swoole\Process::name</a> — Set name of the process.</li><li><a href="swoole-process.pop.php">Swoole\Process::pop</a> — Read and pop data from the message queue.</li><li><a href="swoole-process.push.php">Swoole\Process::push</a> — Write and push data into the message queue.</li><li><a href="swoole-process.read.php">Swoole\Process::read</a> — Read data sending to the process.</li><li><a href="swoole-process.signal.php">Swoole\Process::signal</a> — Send signal to the child processes.</li><li><a href="swoole-process.start.php">Swoole\Process::start</a> — Start the process.</li><li><a href="swoole-process.statqueue.php">Swoole\Process::statQueue</a> — Get the stats of the message queue used as the communication method between processes.</li><li><a href="swoole-process.usequeue.php">Swoole\Process::useQueue</a> — Create a message queue as the communication method between the parent process and child processes.</li><li><a href="swoole-process.wait.php">Swoole\Process::wait</a> — Wait for the events of child processes.</li><li><a href="swoole-process.write.php">Swoole\Process::write</a> — Write data into the pipe and communicate with the parent process or child processes.</li></ul>
</div>
<?php manual_footer($setup); ?>