From e0a617fcada616a8112f7d9df51ac10bd58130af Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 7 May 2015 17:25:16 +0200 Subject: Move signal processing functions and sigaction calls to signals from redshift.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/signals.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/signals.h (limited to 'src/signals.h') diff --git a/src/signals.h b/src/signals.h new file mode 100644 index 0000000..36cdaf1 --- /dev/null +++ b/src/signals.h @@ -0,0 +1,38 @@ +/* signals.h -- Signal processing header + This file is part of Redshift. + + Redshift is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Redshift is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Redshift. If not, see . + + Copyright (c) 2009-2015 Jon Lund Steffensen + Copyright (c) 2015 Mattias Andrée +*/ +#ifndef REDSHIFT_SIGNALS_H +#define REDSHIFT_SIGNALS_H + + +#if defined(HAVE_SIGNAL_H) && !defined(__WIN32__) + +extern volatile sig_atomic_t exiting; +extern volatile sig_atomic_t disable; + +#else /* ! HAVE_SIGNAL_H || __WIN32__ */ +# define exiting 0 +# define disable 0 +#endif /* ! HAVE_SIGNAL_H || __WIN32__ */ + + +int signals_install_handlers(void); + + +#endif /* REDSHIFT_SIGNALS_H */ -- cgit v1.2.3-70-g09d2