view docs/ccguide/signal.refentry @ 575:10b50f909a23

All function prototypes are added.
author roug
date Fri, 01 Nov 2002 10:02:34 +0000
parents 7d803625ead8
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>