From 2cb64e48fcd664067f4bd87e8f46fad694c3c979 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 15 Apr 2018 13:21:34 +0200 Subject: Move initd signal setup to platform specific file Signed-off-by: David Oberhollenzer --- initd/init.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'initd/init.h') diff --git a/initd/init.h b/initd/init.h index a43b3f1..3510073 100644 --- a/initd/init.h +++ b/initd/init.h @@ -19,7 +19,9 @@ #define INIT_H #include +#include #include +#include #include "service.h" #include "telinit.h" @@ -117,5 +119,28 @@ service_t *svclist_remove(pid_t pid); */ int initenv(void); +/********** signal_.c **********/ + +/* + Setup signal handling. Returns -1 on error, a file descriptor on + success. + + The returned file descriptor can be polled and becomes readable + when a signal arrives. Reading from it returns a signalfd_siginfo + structure. + + The returned file descriptor has the close on exec flag set. + + The kernel is also told to send us SIGINT signals if a user presses + the local equivalent of CTRL+ALT+DEL. +*/ +int sigsetup(void); + +/* + Undo everything that sigsetup() changed about signal handling and + restore the default. +*/ +void sigreset(void); + #endif /* INIT_H */ -- cgit v1.2.3