1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2008 Sun Microsystems, Inc.
5
* Copyright (C) 2010 Monty Taylor
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; version 2 of the License.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
#ifndef DRIZZLED_SIGNAL_HANDLER_H
22
#define DRIZZLED_SIGNAL_HANDLER_H
28
static bool volatile signal_thread_in_use= false;
29
extern "C" void drizzled_print_signal_warning(int sig);
30
extern "C" void drizzled_handle_segfault(int sig);
31
extern "C" void drizzled_end_thread_signal(int sig);
34
posix sigaction() based signal handler implementation
35
On some systems, such as Mac OS X, sigset() results in flags
36
such as SA_RESTART being set, and we want to make sure that no such
39
static inline void ignore_signal(int sig)
41
/* Wow. There is a function sigaction which takes a pointer to a
48
l_s.sa_handler= SIG_IGN;
51
int l_rc= sigaction(sig, &l_s, NULL);
55
#endif /* DRIZZLED_SIGNAL_HANDLER_H */