summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorprovos <provos@openbsd.org>2002-07-10 07:05:02 +0000
committerprovos <provos@openbsd.org>2002-07-10 07:05:02 +0000
commit891bcc0b2be870fef13d11f6fd17ba6b690235be (patch)
treec81879525ffee066dd55b1eb0c404ab3842c5316
parentdo not use p++ in tolower(). NetBSD PR 17540. sync w/kame (diff)
downloadwireguard-openbsd-891bcc0b2be870fef13d11f6fd17ba6b690235be.tar.xz
wireguard-openbsd-891bcc0b2be870fef13d11f6fd17ba6b690235be.zip
do not close fds in daemon.
-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");
}
}