From 99f007201c653e281fc71bed5166f0787c099923 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 30 Dec 2015 22:52:18 +0100 Subject: SIGKILL and SIGSTOP cannot be cought, for you get an exception even if SIG_DFL is used MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/unistd/daemonise.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/unistd') diff --git a/src/unistd/daemonise.c b/src/unistd/daemonise.c index a3179b3..58cf848 100644 --- a/src/unistd/daemonise.c +++ b/src/unistd/daemonise.c @@ -266,7 +266,8 @@ int daemonise(const char* name, int flags, ...) /* Reset all signal handlers. */ if ((flags & DAEMONISE_NO_SIG_DFL) == 0) for (i = 1; i < _NSIG; i++) - t (signal(i, SIG_DFL) == SIG_ERR); + if (signal(i, SIG_DFL) == SIG_ERR) + t (errno != EINVAL); /* Set signal mask. */ if ((flags & DAEMONISE_KEEP_SIGMASK) == 0) -- cgit v1.2.3-70-g09d2