view docs/ccguide/signal.refentry @ 557:7d803625ead8

Signal is not finished at all. Missing tag in basic09.appendix
author roug
date Tue, 22 Oct 2002 19:13:01 +0000
parents 28a203bbd2cc
children ed2a3bb12458
line wrap: on
line source

<refentry id="signal">
<refnamediv>
<refname>Signal</refname>
<refpurpose>catch or ignore interrupts</refpurpose>
</refnamediv>

<refsynopsisdiv>
<funcsynopsis>
<funcsynopsisinfo>
#include &lt;signal.h&gt;
</funcsynopsisinfo>
<funcprototype>
  <funcdef><function>signal</function></funcdef>
  <paramdef>type <parameter>arg1</parameter></paramdef>
</funcprototype>
</funcsynopsis>

</refsynopsisdiv>

<refsect1><title>Description</title>
<para>
This call is a comprehensive method of catching or ignoring
signals sent to the current process. Notice that "kill()" does
the sending of signals, and "signal()" does the catching.
</para>
<para>
The signals used by OS-9 are defined in the header file as
follows:
</para>
<programlisting>
/* OS-9 signals */
#define        SIGKILL 0  /* system abort (cannot be caught or ignored)*/
#define        SIGWAKE 1    /* wake up */
#define        SIGQUIT 2    /* keyboard abort */
#define        SIGINT  3    /* keyboard interrupt */

/* special addresses */
#define        SIG_DFL 0    /* reset to default */
#define        SIG_IGN 1    /* ignore */
</programlisting>
<para>
Please note that there is another method of trapping signals,
namely "intercept()" (q.v.). However, since "signal()" and
"intercept()" are mutually incompatible, calls to both of them
must not appear in the same program. The link-loader will
preven the creation of an executable program in which both are
called by aborting with an "entry name clash" error for
"_sigint".
</para>
</refsect1>

<refsect1><title>See Also</title>
<para>
<link linkend="intercept">intercept()</link>,
OS-9 shell command "kill",
<link linkend="kill">kill()</link>
</para>
</refsect1>

</refentry>