<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/book.ev.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'class.evfork.php',
    1 => 'EvFork',
    2 => 'The EvFork class',
  ),
  'up' => 
  array (
    0 => 'book.ev.php',
    1 => 'Ev',
  ),
  'prev' => 
  array (
    0 => 'evembed.sweep.php',
    1 => 'EvEmbed::sweep',
  ),
  'next' => 
  array (
    0 => 'evfork.construct.php',
    1 => 'EvFork::__construct',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/ev/evfork.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/class.evfork.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="class.evfork" class="reference">
 <h1 class="title">The EvFork class</h1>
 
 <div class="partintro"><p class="verinfo">(PECL ev &gt;= 0.2.0)</p>

  <div class="section" id="evfork.intro">
   <h2 class="title">Introduction</h2>
   <p class="simpara">
    Fork watchers are called when a
    <code class="literal">fork()</code>
    was detected (usually because whoever signalled
    <em>libev</em>
    about it by calling
    <span class="methodname"><a href="evloop.fork.php" class="methodname">EvLoop::fork()</a></span>
    ). The invocation is done before the event loop blocks next and before
    <span class="classname"><a href="class.evcheck.php" class="classname">EvCheck</a></span>
    watchers are being called, and only in the child after the fork. Note,
    that if whoever calling
    <span class="methodname"><a href="evloop.fork.php" class="methodname">EvLoop::fork()</a></span>
    calls it in the wrong process, the fork handlers will be invoked, too.
   </p>
  </div>

  <div class="section" id="evfork.synopsis">
   <h2 class="title">Class synopsis</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">EvFork</strong>
     </span>
     <span class="ooclass">
      <span class="modifier">extends</span>
       <a href="class.evwatcher.php" class="classname">EvWatcher</a>
     </span>
     {</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Inherited properties */</div>
    <div class="fieldsynopsis">
     <span class="modifier">public</span>
      <var class="varname"><a href="class.evwatcher.php#evwatcher.props.is-active">$<var class="varname">is_active</var></a></var>;</div>
<div class="fieldsynopsis"><span class="modifier">public</span>
      <var class="varname"><a href="class.evwatcher.php#evwatcher.props.data">$<var class="varname">data</var></a></var>;</div>
<div class="fieldsynopsis"><span class="modifier">public</span>
      <var class="varname"><a href="class.evwatcher.php#evwatcher.props.is-pending">$<var class="varname">is_pending</var></a></var>;</div>
<div class="fieldsynopsis"><span class="modifier">public</span>
      <var class="varname"><a href="class.evwatcher.php#evwatcher.props.priority">$<var class="varname">priority</var></a></var>;</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Methods */</div>
    <div class="constructorsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="methodname"><a href="evfork.construct.php" class="methodname">__construct</a></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="methodparam">
    
    <span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span> <code class="parameter">$data</code>
    <span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span>
   </span>, <span class="methodparam">
    
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$priority</code>
    <span class="initializer"> = 0</span>
   </span>)</div>

    <div class="methodsynopsis dc-description"><span class="modifier">final</span>
   <span class="modifier">public</span>
   <span class="modifier">static</span>
   <span class="methodname"><a href="evfork.createstopped.php" class="methodname">createStopped</a></span>(<span class="methodparam">
    
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$callback</code>
   </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 class="initializer"> = ?</span></span>, <span class="methodparam">
    
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$priority</code>
   <span class="initializer"> = ?</span></span>): <span class="type"><a href="language.types.object.php" class="type object">object</a></span></div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Inherited methods */</div>
    <div class="methodsynopsis dc-description"><span class="modifier">public</span>
   <span class="methodname"><a href="evwatcher.clear.php" class="methodname">EvWatcher::clear</a></span>(): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span>
   <span class="methodname"><a href="evwatcher.feed.php" class="methodname">EvWatcher::feed</a></span>(<span class="methodparam">
    
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$revents</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="evwatcher.getloop.php" class="methodname">EvWatcher::getLoop</a></span>(): <span class="type"><a href="class.evloop.php" class="type EvLoop">EvLoop</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span>
   <span class="methodname"><a href="evwatcher.invoke.php" class="methodname">EvWatcher::invoke</a></span>(<span class="methodparam">
    
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$revents</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="evwatcher.keepalive.php" class="methodname">EvWatcher::keepalive</a></span>(<span class="methodparam">
    
    <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span> <code class="parameter">$value</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="evwatcher.setcallback.php" class="methodname">EvWatcher::setCallback</a></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="evwatcher.start.php" class="methodname">EvWatcher::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="evwatcher.stop.php" class="methodname">EvWatcher::stop</a></span>(): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>

   }</div>

  </div>
 </div>

 










<h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="evfork.construct.php">EvFork::__construct</a> — Constructs the EvFork watcher object</li><li><a href="evfork.createstopped.php">EvFork::createStopped</a> — Creates a stopped instance of EvFork watcher class</li></ul>
</div>
<?php manual_footer($setup); ?>