annotate docs/ccguide/signal.refentry @ 573:d9ab3688bb71

All function prototypes are added.
author roug
date Fri, 01 Nov 2002 10:02:34 +0000
parents 7d803625ead8
children ed2a3bb12458
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="signal">
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>Signal</refname>
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
4 <refpurpose>catch or ignore interrupts</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>
468
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
9 <funcsynopsisinfo>
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
10 #include &lt;signal.h&gt;
60b821f18853 A little here and there.
roug
parents: 466
diff changeset
11 </funcsynopsisinfo>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
12 <funcprototype>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
13 <funcdef><function>signal</function></funcdef>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
14 <paramdef>type <parameter>arg1</parameter></paramdef>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
15 </funcprototype>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
16 </funcsynopsis>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
17
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
18 </refsynopsisdiv>
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 <refsect1><title>Description</title>
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
21 <para>
557
7d803625ead8 Signal is not finished at all.
roug
parents: 556
diff changeset
22 This call is a comprehensive method of catching or ignoring
7d803625ead8 Signal is not finished at all.
roug
parents: 556
diff changeset
23 signals sent to the current process. Notice that "kill()" does
7d803625ead8 Signal is not finished at all.
roug
parents: 556
diff changeset
24 the sending of signals, and "signal()" does the catching.
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
25 </para>
556
28a203bbd2cc findstr and signal finished.
roug
parents: 544
diff changeset
26 <para>
28a203bbd2cc findstr and signal finished.
roug
parents: 544
diff changeset
27 The signals used by OS-9 are defined in the header file as
28a203bbd2cc findstr and signal finished.
roug
parents: 544
diff changeset
28 follows:
28a203bbd2cc findstr and signal finished.
roug
parents: 544
diff changeset
29 </para>
28a203bbd2cc findstr and signal finished.
roug
parents: 544
diff changeset
30 <programlisting>
28a203bbd2cc findstr and signal finished.
roug
parents: 544
diff changeset
31 /* OS-9 signals */
28a203bbd2cc findstr and signal finished.
roug
parents: 544
diff changeset
32 #define SIGKILL 0 /* system abort (cannot be caught or ignored)*/
28a203bbd2cc findstr and signal finished.
roug
parents: 544
diff changeset
33 #define SIGWAKE 1 /* wake up */
28a203bbd2cc findstr and signal finished.
roug
parents: 544
diff changeset
34 #define SIGQUIT 2 /* keyboard abort */
28a203bbd2cc findstr and signal finished.
roug
parents: 544
diff changeset
35 #define SIGINT 3 /* keyboard interrupt */
28a203bbd2cc findstr and signal finished.
roug
parents: 544
diff changeset
36
28a203bbd2cc findstr and signal finished.
roug
parents: 544
diff changeset
37 /* special addresses */
28a203bbd2cc findstr and signal finished.
roug
parents: 544
diff changeset
38 #define SIG_DFL 0 /* reset to default */
28a203bbd2cc findstr and signal finished.
roug
parents: 544
diff changeset
39 #define SIG_IGN 1 /* ignore */
28a203bbd2cc findstr and signal finished.
roug
parents: 544
diff changeset
40 </programlisting>
28a203bbd2cc findstr and signal finished.
roug
parents: 544
diff changeset
41 <para>
28a203bbd2cc findstr and signal finished.
roug
parents: 544
diff changeset
42 Please note that there is another method of trapping signals,
28a203bbd2cc findstr and signal finished.
roug
parents: 544
diff changeset
43 namely "intercept()" (q.v.). However, since "signal()" and
28a203bbd2cc findstr and signal finished.
roug
parents: 544
diff changeset
44 "intercept()" are mutually incompatible, calls to both of them
28a203bbd2cc findstr and signal finished.
roug
parents: 544
diff changeset
45 must not appear in the same program. The link-loader will
28a203bbd2cc findstr and signal finished.
roug
parents: 544
diff changeset
46 preven the creation of an executable program in which both are
28a203bbd2cc findstr and signal finished.
roug
parents: 544
diff changeset
47 called by aborting with an "entry name clash" error for
28a203bbd2cc findstr and signal finished.
roug
parents: 544
diff changeset
48 "_sigint".
28a203bbd2cc findstr and signal finished.
roug
parents: 544
diff changeset
49 </para>
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
50 </refsect1>
544
ba824286a6a0 All "See Also" implemented
roug
parents: 468
diff changeset
51
ba824286a6a0 All "See Also" implemented
roug
parents: 468
diff changeset
52 <refsect1><title>See Also</title>
ba824286a6a0 All "See Also" implemented
roug
parents: 468
diff changeset
53 <para>
ba824286a6a0 All "See Also" implemented
roug
parents: 468
diff changeset
54 <link linkend="intercept">intercept()</link>,
ba824286a6a0 All "See Also" implemented
roug
parents: 468
diff changeset
55 OS-9 shell command "kill",
ba824286a6a0 All "See Also" implemented
roug
parents: 468
diff changeset
56 <link linkend="kill">kill()</link>
ba824286a6a0 All "See Also" implemented
roug
parents: 468
diff changeset
57 </para>
ba824286a6a0 All "See Also" implemented
roug
parents: 468
diff changeset
58 </refsect1>
ba824286a6a0 All "See Also" implemented
roug
parents: 468
diff changeset
59
466
bea58398bb15 Skeletons for the C Compiler User's Guide, 1983
roug
parents:
diff changeset
60 </refentry>