annotate docs/ccguide/wait.refentry @ 476:1e5bbc865130

entered: chdir chmod qsort strass toupper tsleep wait
author roug
date Sun, 06 Oct 2002 09:10:36 +0000
parents 60b821f18853
children 9a345cb1c03a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
1 <refentry id="wait">
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
2 <refnamediv>
468
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
3 <refname>Wait</refname>
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
4 <refpurpose>wait for task termination</refpurpose>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
5 </refnamediv>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
6
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
7 <refsynopsisdiv>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
8 <funcsynopsis>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
9 <funcprototype>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
10 <funcdef><function>wait</function></funcdef>
476
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
11 <paramdef>int *<parameter>status</parameter></paramdef>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
12 </funcprototype>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
13
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
14 <funcprototype>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
15 <funcdef><function>wait</function></funcdef>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
16 <paramdef><parameter>0</parameter></paramdef>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
17 </funcprototype>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
18 </funcsynopsis>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
19
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
20 </refsynopsisdiv>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
21
476
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
22 <refsect1><title>Assembler Equivalent</title>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
23 <para>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
24 os9 F$WAIT
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
25 </para>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
26 </refsect1>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
27 <refsect1><title>Description</title>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
28 <para>
476
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
29 Wait is used to halt the current task until a child task has
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
30 terminated.
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
31 </para>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
32 <para>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
33 The call returns the task id of the terminating task and places
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
34 the status of that task in the integer pointed to by "status"
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
35 unless "status" is 0. A wait must be executed for each child
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
36 task spawned.
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
37 </para>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
38 <para>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
39 The status will contain the argument of the "exit" or "_exit"
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
40 call in the child task of the signal number if it was
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
41 interrupted. A normally terminating C program with no call to
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
42 "exit" or "_exit" has an implied call of "exit(0)".
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
43 </para>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
44 </refsect1>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
45 <refsect1><title>Caveats</title>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
46 <para>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
47 NOTE that the status is the OS-9 status code and is not
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
48 compatible with codes on other systems.
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
49 </para>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
50 </refsect1>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
51 <refsect1><title>Diagnostics</title>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
52 <para>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
53 -1 is returned if there is no child to be waited for.
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
54 </para>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
55 </refsect1>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
56 <refsect1><title>See Also</title>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
57 <para>
1e5bbc865130 entered: chdir chmod qsort strass toupper tsleep wait
roug
parents: 468
diff changeset
58 fork(),signal(),exit(),_exit()
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
59 </para>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
60 </refsect1>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
61 </refentry>