summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>2002-07-10 07:05:03 +0000
committerNiels Provos <provos@cvs.openbsd.org>2002-07-10 07:05:03 +0000
commit43a951c2c004c24c54dcce11fecc2018d6273dbd (patch)
treeae39a76cd9cc126e3ae83e813fa56a007fbe148b /bin
parentc8038a0f26829ccf7804254bec887d2ba7d9fcb1 (diff)
do not close fds in daemon.
Diffstat (limited to 'bin')
-rw-r--r--bin/systrace/intercept.c4
-rw-r--r--bin/systrace/systrace.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/bin/systrace/intercept.c b/bin/systrace/intercept.c
index 3580167fe04..4f2f8b18077 100644
--- a/bin/systrace/intercept.c
+++ b/bin/systrace/intercept.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intercept.c,v 1.12 2002/07/09 20:46:18 provos Exp $ */
+/* $OpenBSD: intercept.c,v 1.13 2002/07/10 07:05:02 provos Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
@@ -293,7 +293,7 @@ intercept_run(int bg, int fd, char *path, char *const argv[])
}
if (bg) {
- if (daemon(0, 0) == -1) {
+ if (daemon(0, 1) == -1) {
kill(pid, SIGKILL);
err(1, "daemon");
}
diff --git a/bin/systrace/systrace.c b/bin/systrace/systrace.c
index f3224220093..f9870c8850d 100644
--- a/bin/systrace/systrace.c
+++ b/bin/systrace/systrace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: systrace.c,v 1.22 2002/07/09 20:46:18 provos Exp $ */
+/* $OpenBSD: systrace.c,v 1.23 2002/07/10 07:05:02 provos Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
@@ -601,7 +601,7 @@ main(int argc, char **argv)
err(1, "attachpid");
if (background) {
- if (daemon(0, 0) == -1)
+ if (daemon(0, 1) == -1)
err(1, "daemon");
}
}