Mercurial > hg > Members > kono > nitros9-code
view docs/ccguide/wait.refentry @ 2798:b70d93f8d7ce lwtools-port
Updated coco1/modules/makefile and coco3/modules/makefile to help resolve issues with i(x) and s(x) descriptors.
Updated level1/coco1/modules/makefile & level2/coco3/modules/makefile
so that correct values would be sent to assembler when
building superdesc.asm for s(x).dd and i(x).dd descriptors.
author | drencor-xeen |
---|---|
date | Mon, 28 Jan 2013 16:13:05 -0600 |
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>