summaryrefslogtreecommitdiff
path: root/bin/systrace
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>2002-06-12 22:14:52 +0000
committerNiels Provos <provos@cvs.openbsd.org>2002-06-12 22:14:52 +0000
commit3b8b864ee829f3d479a57884744390038e2749f2 (patch)
treed6734a154fe550c70c94b6ac72cff01b9d50cc86 /bin/systrace
parent1de867e488ca037bc40380f13103f1edb3b12385 (diff)
gui needs to be started after child has been forked to prevent fds from
being inherited and stdout/stdin from being mangled; from xs@kittenz.org
Diffstat (limited to 'bin/systrace')
-rw-r--r--bin/systrace/systrace.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/systrace/systrace.c b/bin/systrace/systrace.c
index 42cfacf7be5..9dbf09eaaea 100644
--- a/bin/systrace/systrace.c
+++ b/bin/systrace/systrace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: systrace.c,v 1.15 2002/06/11 05:21:17 jsyn Exp $ */
+/* $OpenBSD: systrace.c,v 1.16 2002/06/12 22:14:51 provos Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
@@ -449,10 +449,6 @@ main(int argc, char **argv)
systrace_initpolicy(filename);
systrace_initcb();
- /* Start the policy gui if necessary */
- if (usex11 && !automatic && !allow)
- requestor_start(guipath);
-
if ((fd = intercept_open()) == -1)
exit(1);
@@ -481,6 +477,10 @@ main(int argc, char **argv)
err(1, "attachpid");
}
+ /* Start the policy gui if necessary */
+ if (usex11 && !automatic && !allow)
+ requestor_start(guipath);
+
while (intercept_read(fd) != -1)
if (!intercept_existpids())
break;