Mercurial > hg > Members > kono > nitros9-code
view docs/ccguide/wait.refentry @ 2342:82c9672489a0
Made change to workings of SHARE. bit to what I believe is the proper way.
author | boisy |
---|---|
date | Fri, 15 Jan 2010 15:54:53 +0000 |
parents | 9a345cb1c03a |
children |
line wrap: on
line source
<refentry id="wait"> <refnamediv> <refname>Wait</refname> <refpurpose>wait for task termination</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcprototype> <funcdef><function>wait</function></funcdef> <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> 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> <link linkend="os9fork">os9fork()</link>, <link linkend="signal">signal()</link>, <link linkend="exit">exit(),_exit()</link> </para> </refsect1> </refentry>