changeset 476:1e5bbc865130

entered: chdir chmod qsort strass toupper tsleep wait
author roug
date Sun, 06 Oct 2002 09:10:36 +0000
parents c8d3a5ef9537
children 7a5d3fcbe2d8
files docs/ccguide/wait.refentry
diffstat 1 files changed, 41 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/docs/ccguide/wait.refentry	Sun Oct 06 09:10:36 2002 +0000
+++ b/docs/ccguide/wait.refentry	Sun Oct 06 09:10:36 2002 +0000
@@ -8,15 +8,54 @@
 <funcsynopsis>
 <funcprototype>
   <funcdef><function>wait</function></funcdef>
-  <paramdef>type <parameter>arg1</parameter></paramdef>
+  <paramdef>int *<parameter>status</parameter></paramdef>
+</funcprototype>
+
+<funcprototype>
+  <funcdef><function>wait</function></funcdef>
+  <paramdef><parameter>0</parameter></paramdef>
 </funcprototype>
 </funcsynopsis>
 
 </refsynopsisdiv>
 
+<refsect1><title>Assembler Equivalent</title>
+<para>
+os9 F$WAIT
+</para>
+</refsect1>
 <refsect1><title>Description</title>
 <para>
-Placeholder
+Wait is used to halt the current task until a child task has
+terminated.
+</para>
+<para>
+The call returns the task id of the terminating task and places
+the status of that task in the integer pointed to by "status"
+unless "status" is 0. A wait must be executed for each child
+task spawned.
+</para>
+<para>
+The status will contain the argument of the "exit" or "_exit"
+call in the child task of the signal number if it was
+interrupted. A normally terminating C program with no call to
+"exit" or "_exit" has an implied call of "exit(0)".
+</para>
+</refsect1>
+<refsect1><title>Caveats</title>
+<para>
+NOTE that the status is the OS-9 status code and is not
+compatible with codes on other systems.
+</para>
+</refsect1>
+<refsect1><title>Diagnostics</title>
+<para>
+-1 is returned if there is no child to be waited for.
+</para>
+</refsect1>
+<refsect1><title>See Also</title>
+<para>
+fork(),signal(),exit(),_exit()
 </para>
 </refsect1>
 </refentry>