Back to index

glibc  2.9
signum.h
Go to the documentation of this file.
00001 /* Copyright (C) 1991, 1993, 1996, 1998 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003 
00004    The GNU C Library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Lesser General Public
00006    License as published by the Free Software Foundation; either
00007    version 2.1 of the License, or (at your option) any later version.
00008 
00009    The GNU C Library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Lesser General Public License for more details.
00013 
00014    You should have received a copy of the GNU Lesser General Public
00015    License along with the GNU C Library; if not, write to the Free
00016    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00017    02111-1307 USA.  */
00018 
00019 #ifdef _SIGNAL_H
00020 
00021 /* Fake signal functions.  */
00022 
00023 #define       SIG_ERR        ((__sighandler_t) -1)      /* Error return.  */
00024 #define       SIG_DFL        ((__sighandler_t)  0)      /* Default action.  */
00025 #define       SIG_IGN        ((__sighandler_t)  1)      /* Ignore signal.  */
00026 
00027 #ifdef __USE_UNIX98
00028 # define SIG_HOLD ((__sighandler_t)  2)   /* Add signal to hold mask.  */
00029 #endif
00030 
00031 /* Signals in the 1-15 range are defined with their historical numbers.
00032    Signals in the 20-25 range are relatively new and have no ingrained
00033    numbers. */
00034 
00035 /* ANSI signals.  */
00036 #define       SIGINT 2      /* Interactive attention signal.  */
00037 #define       SIGILL 4      /* Illegal instruction.  */
00038 #define       SIGABRT       6      /* Abnormal termination.  */
00039 #define       SIGFPE 8      /* Erroneous arithmetic operation.  */
00040 #define       SIGSEGV       11     /* Invalid access to storage.  */
00041 #define       SIGTERM       15     /* Termination request.  */
00042 
00043 /* Historical signals specified by POSIX. */
00044 #define       SIGHUP 1      /* Hangup.  */
00045 #define       SIGQUIT       3      /* Quit.  */
00046 #define       SIGKILL       9      /* Kill (cannot be blocked, caught, or ignored).  */
00047 #define       SIGPIPE       13     /* Broken pipe.  */
00048 #define       SIGALRM       14     /* Alarm clock.  */
00049 
00050 /* New(er) POSIX signals. */
00051 #define       SIGSTOP       20     /* Stop (cannot be blocked, caught, or ignored).  */
00052 #define       SIGCONT       21     /* Continue.  */
00053 #define       SIGTSTP       22     /* Keyboard stop.  */
00054 #define       SIGTTIN       23     /* Background read from control terminal.  */
00055 #define       SIGTTOU       24     /* Background write to control terminal.  */
00056 #define       SIGCHLD       25     /* Child terminated or stopped.  */
00057 
00058 #define       _NSIG  26
00059 
00060 /* Archaic names for compatibility. */
00061 #define       SIGIOT  SIGABRT      /* IOT instruction, abort() on a PDP11 */
00062 #define       SIGCLD  SIGCHLD      /* Old System V name */
00063 
00064 #endif /* <signal.h> included.  */