<listitem><para>process output stream</para></listitem>
</varlistentry>
<varlistentry>
- <term><replaceable>ERROR</replaceable></term>
+ <term><replaceable>ERROR-STREAM</replaceable></term>
<listitem><para>process error stream</para></listitem>
</varlistentry>
<varlistentry>
- <term><replaceable>%STATUS</replaceable></term>
- <listitem><para>either <symbol>:RUNNING</symbol> or
- <symbol>:EXITED</symbol></para></listitem>
+ <term><replaceable>%STATUS</replaceable></term> <listitem><para>either
+ <symbol>:RUNNING</symbol>, <symbol>:STOPPED</symbol>,
+ <symbol>:SIGNALED</symbol>, <symbol>:EXITED</symbol></para></listitem>,
+ <symbol>:ERROR</symbol> or <symbol>:ABORT</symbol>
</varlistentry>
<varlistentry>
<term><replaceable>%CODE</replaceable></term>
process id, communication streams, runtime status and exit code. It is
returned as third value of <xref linkend="ref.run-program"/>.</para>
</refsect1>
+ </refentry>
+
+ <!-- ====================================================================== -->
+ <!-- EXT:EXTERNAL-PROCESS-STATUS -->
+ <!-- ====================================================================== -->
+ <refentry xml:id="ref.external-process-status">
+ <refnamediv>
+ <refname><function>ext:external-process-status</function></refname>
+ <refpurpose>Check status of <xref
+ linkend="ref.external-process"/>.</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <title>Function</title>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>ext:external-process-status</funcdef>
+ <paramdef><parameter>external-process</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>Checks status of external-process. Returns it's current status, and
+ if exited - <symbol>EXIT-CODE</symbol> as second value.</para>
+ </refsect1>
+ </refsynopsisdiv>
</refentry>
<!-- ======================================================================
(docfun ext:system function (string) "
Executes a Shell command as if STRING is an input to the Shell.")
+(docfun ext:run-program function (command argv &key
+ (input :stream)
+ (output :stream)
+ (error :output)
+ (wait t) environ
+ if-input-does-no-exist
+ (if-output-exists :error)
+ (if-error-exists :error)
+ (external-format :default)) "
+Creates external process with COMMAND given args ARGV, where INPUT,
+OUTPUT and ERROR might be :STREAM, T, NIL, pathname designator or
+stream (gray streams doesn't work). ERROR might be also :OUTPUT. If
+WAIT is T, then process is ran asynchronously.
+
+Returns two-way stream for communication, process status (or exit
+code, depending on wait parameter) and EXTERNAL-PROCESS structure.")
+
(doctype t "
The type T is a supertype of every type. Every object belongs to this type.")