From 4d2317dafb3c3aac56f9f604262d82fd1b396a19 Mon Sep 17 00:00:00 2001 From: Andrew Gregory Date: Mon, 30 Nov 2015 12:36:30 -0500 Subject: move signal handlers to sighandler.[ch] Signals are special because they run asynchronously, making them non-trivial to handle correctly. Move the handlers a separate file to offset them from the normal code and make them easier to separate into individual functions without further cluttering pacman.c Signed-off-by: Andrew Gregory Signed-off-by: Allan McRae --- src/pacman/sighandler.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/pacman/sighandler.h (limited to 'src/pacman/sighandler.h') diff --git a/src/pacman/sighandler.h b/src/pacman/sighandler.h new file mode 100644 index 00000000..f7abc9ee --- /dev/null +++ b/src/pacman/sighandler.h @@ -0,0 +1,27 @@ +/* + * sighandler.h + * + * Copyright (c) 2015 Pacman Development Team + * + * This program 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 2 of the License, or + * (at your option) any later version. + * + * This program 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 this program. If not, see . + */ + +#ifndef _PM_SIGHANDLER_H +#define _PM_SIGHANDLER_H + +void install_signal_handlers(void); + +#endif /* _PM_SIGHANDLER_H */ + +/* vim: set noet: */ -- cgit v1.2.3-24-g4f1b