annotate docs/ccguide/signal.refentry @ 578:ed2a3bb12458

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