diff options
author | Andrew Gregory <andrew.gregory.8@gmail.com> | 2015-11-30 18:36:30 +0100 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2015-12-05 09:09:39 +0100 |
commit | 4d2317dafb3c3aac56f9f604262d82fd1b396a19 (patch) | |
tree | fcc34638f1c0d75c523a237a8c58aec219b72c1a /src/pacman/sighandler.h | |
parent | 220a3ce2b8177bb3cc8a7a20715b67d5cbf7fc71 (diff) | |
download | pacman-4d2317dafb3c3aac56f9f604262d82fd1b396a19.tar.gz pacman-4d2317dafb3c3aac56f9f604262d82fd1b396a19.tar.xz |
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 <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src/pacman/sighandler.h')
-rw-r--r-- | src/pacman/sighandler.h | 27 |
1 files changed, 27 insertions, 0 deletions
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 <pacman-dev@archlinux.org> + * + * 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 <http://www.gnu.org/licenses/>. + */ + +#ifndef _PM_SIGHANDLER_H +#define _PM_SIGHANDLER_H + +void install_signal_handlers(void); + +#endif /* _PM_SIGHANDLER_H */ + +/* vim: set noet: */ |