466
|
1 <refentry id="signal">
|
|
2 <refnamediv>
|
468
|
3 <refname>Signal</refname>
|
|
4 <refpurpose>catch or ignore interrupts</refpurpose>
|
466
|
5 </refnamediv>
|
|
6
|
|
7 <refsynopsisdiv>
|
|
8 <funcsynopsis>
|
468
|
9 <funcsynopsisinfo>
|
|
10 #include <signal.h>
|
|
11 </funcsynopsisinfo>
|
466
|
12 <funcprototype>
|
|
13 <funcdef><function>signal</function></funcdef>
|
|
14 <paramdef>type <parameter>arg1</parameter></paramdef>
|
|
15 </funcprototype>
|
|
16 </funcsynopsis>
|
|
17
|
|
18 </refsynopsisdiv>
|
|
19
|
|
20 <refsect1><title>Description</title>
|
|
21 <para>
|
557
|
22 This call is a comprehensive method of catching or ignoring
|
|
23 signals sent to the current process. Notice that "kill()" does
|
|
24 the sending of signals, and "signal()" does the catching.
|
466
|
25 </para>
|
556
|
26 <para>
|
|
27 The signals used by OS-9 are defined in the header file as
|
|
28 follows:
|
|
29 </para>
|
|
30 <programlisting>
|
|
31 /* OS-9 signals */
|
|
32 #define SIGKILL 0 /* system abort (cannot be caught or ignored)*/
|
|
33 #define SIGWAKE 1 /* wake up */
|
|
34 #define SIGQUIT 2 /* keyboard abort */
|
|
35 #define SIGINT 3 /* keyboard interrupt */
|
|
36
|
|
37 /* special addresses */
|
|
38 #define SIG_DFL 0 /* reset to default */
|
|
39 #define SIG_IGN 1 /* ignore */
|
|
40 </programlisting>
|
|
41 <para>
|
|
42 Please note that there is another method of trapping signals,
|
|
43 namely "intercept()" (q.v.). However, since "signal()" and
|
|
44 "intercept()" are mutually incompatible, calls to both of them
|
|
45 must not appear in the same program. The link-loader will
|
|
46 preven the creation of an executable program in which both are
|
|
47 called by aborting with an "entry name clash" error for
|
|
48 "_sigint".
|
|
49 </para>
|
466
|
50 </refsect1>
|
544
|
51
|
|
52 <refsect1><title>See Also</title>
|
|
53 <para>
|
|
54 <link linkend="intercept">intercept()</link>,
|
|
55 OS-9 shell command "kill",
|
|
56 <link linkend="kill">kill()</link>
|
|
57 </para>
|
|
58 </refsect1>
|
|
59
|
466
|
60 </refentry>
|