GNUnet  0.17.5
gnunet_signal_lib.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 GNUnet e.V.
4 
5  GNUnet is free software: you can redistribute it and/or modify it
6  under the terms of the GNU Affero General Public License as published
7  by the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  GNUnet is distributed in the hope that it will be useful, but
11  WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Affero General Public License for more details.
14 
15  You should have received a copy of the GNU Affero General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  SPDX-License-Identifier: AGPL3.0-or-later
19  */
20 
36 #ifndef GNUNET_SIGNAL_LIB_H
37 #define GNUNET_SIGNAL_LIB_H
38 
39 #ifdef __cplusplus
40 extern "C"
41 {
42 #if 0 /* keep Emacsens' auto-indent happy */
43 }
44 #endif
45 #endif
46 
52 
53 
62 typedef void
63 (*GNUNET_SIGNAL_Handler) (void);
64 
65 
74 struct GNUNET_SIGNAL_Context *
77 
78 
85 void
87 
88 
96 void
97 GNUNET_SIGNAL_raise (const int sig);
98 
99 
100 #if 0 /* keep Emacsens' auto-indent happy */
101 {
102 #endif
103 #ifdef __cplusplus
104 }
105 #endif
106 
107 /* ifndef GNUNET_SIGNAL_LIB_H */
108 #endif
109  /* end of group */
111  /* end of group addition */
113 
114 /* end of gnunet_signal_lib.h */
static struct GNUNET_DNSSTUB_Context * ctx
Context for DNS resolution.
struct GNUNET_SIGNAL_Context * GNUNET_SIGNAL_handler_install(int signal, GNUNET_SIGNAL_Handler handler)
Install a signal handler that will be run if the given signal is received.
Definition: signal.c:51
void(* GNUNET_SIGNAL_Handler)(void)
A signal handler.
void GNUNET_SIGNAL_raise(const int sig)
Raise the given signal by calling the installed signal handlers.
Definition: signal.c:97
void GNUNET_SIGNAL_handler_uninstall(struct GNUNET_SIGNAL_Context *ctx)
Uninstall a previously installed signal handler.
Definition: signal.c:77