Main Page | Modules | Data Structures | File List | Data Fields | Related Pages

sig.h

00001 /***************************************************************************
00002  * CVSID: $Id: sig.h,v 1.3 2004/08/29 18:43:23 stefanb Exp $
00003  *
00004  * sig.h : Functions for signal handling
00005  *
00006  * Copyright (C) 2004 Stefan Bambach, <sbambach@gmx.net>
00007  *
00008  * Licensed under the GNU General Public License 2.0
00009  *
00010  * This program is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2 of the License, or
00013  * (at your option) any later version.
00014  *
00015  * This program is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  * GNU General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU General Public License
00021  * along with this program; if not, write to the Free Software
00022  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023  *
00024  **************************************************************************/
00025 
00026 
00039 #ifndef __LIBSB_SIG_H__
00040 #define __LIBSB_SIG_H__
00041 
00042 
00043 #ifdef HAVE_CONFIG_H
00044 #  include <config.h>
00045 #endif
00046 
00047 #include <signal.h>
00048 
00049 #if defined(__cplusplus)
00050 extern "C" {
00051 #endif
00052 
00053 
00054 
00056 #ifdef NSIG
00057     #define MAX_SIGNALS NSIG
00058 #else
00059     #ifdef _NSIG
00060         #define MAX_SIGNALS _NSIG
00061     #else
00062         #define MAX_SIGNALS 65
00063     #endif
00064 #endif
00065 
00066 
00067 
00069 typedef void (*sb_signal_handler_t)(int signum);
00070 
00071 
00072     
00077 int sb_signal_init(void);
00078 
00079 
00080 
00085 int sb_signal_is_initialized(void);
00086 
00087 
00088 
00095 int sb_signal_set_handler(int signum, sb_signal_handler_t handler);
00096  
00097 
00098 
00104 int sb_signal_restore_handler(int signum);
00105  
00106 
00107 
00112 int sb_signal_restore_all_handlers(void);
00113  
00114 
00115 
00116 #if defined(__cplusplus)
00117 }
00118 #endif
00119 
00120 #endif
00121 
00122 

Generated on Wed Mar 30 13:43:27 2005 for Mntd by  doxygen 1.3.9.1