doc: refine documentation for external-process
authorDaniel Kochmański <daniel@turtleware.eu>
Wed, 12 Aug 2015 09:21:27 +0000 (11:21 +0200)
committerDaniel Kochmański <daniel@turtleware.eu>
Wed, 12 Aug 2015 09:21:27 +0000 (11:21 +0200)
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
doc/ref_os.xmlf
src/doc/help.lsp

index 0ab3272..085c151 100644 (file)
@@ -352,13 +352,14 @@ ls [--help | -?] filename*
      <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>
@@ -373,6 +374,34 @@ ls [--help | -?] filename*
    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>
 
  <!-- ======================================================================
index 3e3caf7..f951a83 100644 (file)
@@ -3059,6 +3059,23 @@ Returns T if X is a symbol; NIL otherwise.")
 (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.")