summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2002-09-17 04:57:54 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2002-09-17 04:57:54 +0000
commitbb60d56d116e8e80594e340bdf8f93385d831783 (patch)
treeefe4a9da449a39ac4d00e845c006c0e42fffbd3e /bin
parent0af5f7d7e417327f279b2e0c39805df2245cb728 (diff)
daemon should not change the directory. from provos
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 59376ac12f2..e99649d9c8f 100644
--- a/bin/systrace/intercept.c
+++ b/bin/systrace/intercept.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intercept.c,v 1.30 2002/09/06 22:56:21 deraadt Exp $ */
+/* $OpenBSD: intercept.c,v 1.31 2002/09/17 04:57:53 itojun Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
@@ -313,7 +313,7 @@ intercept_run(int bg, int fd, char *path, char *const argv[])
}
if (bg) {
- if (daemon(0, 1) == -1) {
+ if (daemon(1, 1) == -1) {
kill(pid, SIGKILL);
err(1, "daemon");
}
diff --git a/bin/systrace/systrace.c b/bin/systrace/systrace.c
index 47048410a83..a4ac10eaa11 100644
--- a/bin/systrace/systrace.c
+++ b/bin/systrace/systrace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: systrace.c,v 1.33 2002/09/16 04:34:46 itojun Exp $ */
+/* $OpenBSD: systrace.c,v 1.34 2002/09/17 04:57:53 itojun Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
@@ -512,7 +512,7 @@ main(int argc, char **argv)
err(1, "attachpid");
if (background) {
- if (daemon(0, 1) == -1)
+ if (daemon(1, 1) == -1)
err(1, "daemon");
}
}