summaryrefslogtreecommitdiffstats
path: root/libdaemon/dexec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdaemon/dexec.c')
-rw-r--r--libdaemon/dexec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libdaemon/dexec.c b/libdaemon/dexec.c
index 10c757c..0a21777 100644
--- a/libdaemon/dexec.c
+++ b/libdaemon/dexec.c
@@ -39,6 +39,7 @@
#include "dlog.h"
#include "dsignal.h"
+#include "dfork.h"
#include "dexec.h"
@@ -84,6 +85,8 @@ int daemon_execv(const char *dir, int *ret, const char *prog, va_list ap) {
daemon_log(LOG_ERR, "Unable to open /dev/null as STDIN");
_exit(EXIT_FAILURE);
}
+
+ daemon_close_all(-1);
umask(0022); /* Set up a sane umask */