signal.h

Go to the documentation of this file.
00001 /*-
00002  * Copyright (c) 1991, 1993
00003  *      The Regents of the University of California.  All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  * 1. Redistributions of source code must retain the above copyright
00009  *    notice, this list of conditions and the following disclaimer.
00010  * 2. Redistributions in binary form must reproduce the above copyright
00011  *    notice, this list of conditions and the following disclaimer in the
00012  *    documentation and/or other materials provided with the distribution.
00013  * 3. All advertising materials mentioning features or use of this software
00014  *    must display the following acknowledgement:
00015  *      This product includes software developed by the University of
00016  *      California, Berkeley and its contributors.
00017  * 4. Neither the name of the University nor the names of its contributors
00018  *    may be used to endorse or promote products derived from this software
00019  *    without specific prior written permission.
00020  *
00021  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
00022  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00023  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00024  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
00025  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00026  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00027  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00028  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00029  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00030  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00031  * SUCH DAMAGE.
00032  *
00033  *      @(#)signal.h    8.3 (Berkeley) 3/30/94
00034  * $FreeBSD: src/include/signal.h,v 1.24 2003/03/31 23:30:41 jeff Exp $
00035  */
00036 
00037 #ifndef _SIGNAL_H_
00038 #define _SIGNAL_H_
00039 
00040 #include <sys/cdefs.h>
00041 #include <sys/_types.h>
00042 #include <sys/signal.h>
00043 
00044 __BEGIN_DECLS
00045 
00046 struct timespec;
00047 /* The following definitions have been taken from siglist.c file 
00048  * Once signals are implemented then these definitions must be moved to that
00049  * file. (sys_signame,sys_siglist,sys_nsig)  */
00050 
00051 static const char *const sys_signame[NSIG] = {
00052         "Signal 0",
00053         "hup",                          /* SIGHUP */
00054         "int",                          /* SIGINT */
00055         "quit",                         /* SIGQUIT */
00056         "ill",                          /* SIGILL */
00057         "trap",                         /* SIGTRAP */
00058         "abrt",                         /* SIGABRT */
00059         "emt",                          /* SIGEMT */
00060         "fpe",                          /* SIGFPE */
00061         "kill",                         /* SIGKILL */
00062         "bus",                          /* SIGBUS */
00063         "segv",                         /* SIGSEGV */
00064         "sys",                          /* SIGSYS */
00065         "pipe",                         /* SIGPIPE */
00066         "alrm",                         /* SIGALRM */
00067         "term",                         /* SIGTERM */
00068         "urg",                          /* SIGURG */
00069         "stop",                         /* SIGSTOP */
00070         "tstp",                         /* SIGTSTP */
00071         "cont",                         /* SIGCONT */
00072         "chld",                         /* SIGCHLD */
00073         "ttin",                         /* SIGTTIN */
00074         "ttou",                         /* SIGTTOU */
00075         "io",                           /* SIGIO */
00076         "xcpu",                         /* SIGXCPU */
00077         "xfsz",                         /* SIGXFSZ */
00078         "vtalrm",                       /* SIGVTALRM */
00079         "prof",                         /* SIGPROF */
00080         "winch",                        /* SIGWINCH */
00081         "info",                         /* SIGINFO */
00082         "usr1",                         /* SIGUSR1 */
00083         "usr2"                          /* SIGUSR2 */
00084 };
00085 
00086 static const char *const sys_siglist[NSIG] = {
00087         "Signal 0",
00088         "Hangup",                       /* SIGHUP */
00089         "Interrupt",                    /* SIGINT */
00090         "Quit",                         /* SIGQUIT */
00091         "Illegal instruction",          /* SIGILL */
00092         "Trace/BPT trap",               /* SIGTRAP */
00093         "Abort trap",                   /* SIGABRT */
00094         "EMT trap",                     /* SIGEMT */
00095         "Floating point exception",     /* SIGFPE */
00096         "Killed",                       /* SIGKILL */
00097         "Bus error",                    /* SIGBUS */
00098         "Segmentation fault",           /* SIGSEGV */
00099         "Bad system call",              /* SIGSYS */
00100         "Broken pipe",                  /* SIGPIPE */
00101         "Alarm clock",                  /* SIGALRM */
00102         "Terminated",                   /* SIGTERM */
00103         "Urgent I/O condition",         /* SIGURG */
00104         "Suspended (signal)",           /* SIGSTOP */
00105         "Suspended",                    /* SIGTSTP */
00106         "Continued",                    /* SIGCONT */
00107         "Child exited",                 /* SIGCHLD */
00108         "Stopped (tty input)",          /* SIGTTIN */
00109         "Stopped (tty output)",         /* SIGTTOU */
00110         "I/O possible",                 /* SIGIO */
00111         "Cputime limit exceeded",       /* SIGXCPU */
00112         "Filesize limit exceeded",      /* SIGXFSZ */
00113         "Virtual timer expired",        /* SIGVTALRM */
00114         "Profiling timer expired",      /* SIGPROF */
00115         "Window size changes",          /* SIGWINCH */
00116         "Information request",          /* SIGINFO */
00117         "User defined signal 1",        /* SIGUSR1 */
00118         "User defined signal 2"         /* SIGUSR2 */
00119 };
00120 static const int sys_nsig = sizeof(sys_siglist) / sizeof(sys_siglist[0]);
00121 
00122 IMPORT_C int sigaction(int sig, const struct sigaction *act, struct sigaction *oact);
00123 IMPORT_C int sigemptyset(sigset_t* set);
00124 __END_DECLS
00125 
00126 #endif /* !_SIGNAL_H_ */

Copyright © Nokia Corporation 2001-2008
Back to top