aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2015-12-30 22:52:18 +0100
committerMattias Andrée <maandree@member.fsf.org>2015-12-30 22:52:18 +0100
commit99f007201c653e281fc71bed5166f0787c099923 (patch)
treeaa50d1f4cde7ecb7b33eb8100acb68296a5f84c6 /src
parenttypo + other ways to catch fire (diff)
downloadslibc-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.c3
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)