diff options
author | Mattias Andrée <maandree@member.fsf.org> | 2015-12-30 22:52:18 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@member.fsf.org> | 2015-12-30 22:52:18 +0100 |
commit | 99f007201c653e281fc71bed5166f0787c099923 (patch) | |
tree | aa50d1f4cde7ecb7b33eb8100acb68296a5f84c6 /src | |
parent | typo + other ways to catch fire (diff) | |
download | slibc-99f007201c653e281fc71bed5166f0787c099923.tar.gz slibc-99f007201c653e281fc71bed5166f0787c099923.tar.bz2 slibc-99f007201c653e281fc71bed5166f0787c099923.tar.xz |
SIGKILL and SIGSTOP cannot be cought, for you get an exception even if SIG_DFL is used
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/unistd/daemonise.c | 3 |
1 files changed, 2 insertions, 1 deletions
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) |