<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.pcntl-exec" xmlns="http://docbook.org/ns/docbook">
 <refnamediv>
  <refname>pcntl_exec</refname>
  <refpurpose>Executes specified program in current process space</refpurpose>
 </refnamediv>
 
 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type>bool</type><methodname>pcntl_exec</methodname>
   <methodparam><type>string</type><parameter>path</parameter></methodparam>
   <methodparam choice="opt"><type>array</type><parameter>args</parameter><initializer>[]</initializer></methodparam>
   <methodparam choice="opt"><type>array</type><parameter>env_vars</parameter><initializer>[]</initializer></methodparam>
  </methodsynopsis>
  <para>
   Executes the program with the given arguments.
  </para>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>path</parameter></term>
     <listitem>
      <para>
       <parameter>path</parameter> must be the path to a binary executable or a
       script with a valid path pointing to an executable in the shebang (
       #!/usr/local/bin/perl for example) as the first line.  See your system's
       man execve(2) page for additional information.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>args</parameter></term>
     <listitem>
      <para>
       <parameter>args</parameter> is an array of argument strings passed to the
       program.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>env_vars</parameter></term>
     <listitem>
      <para>
       <parameter>env_vars</parameter> is an array of strings which are passed as
       environment to the program.  The array is in the format of name => value,
       the key being the name of the environmental variable and the value being
       the value of that variable.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   Returns &false;.
  </para>
 </refsect1>

</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
