summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--regress/sys/kern/ptrace/ptrace.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/regress/sys/kern/ptrace/ptrace.c b/regress/sys/kern/ptrace/ptrace.c
index 51db6f4de18..bb07185d1d2 100644
--- a/regress/sys/kern/ptrace/ptrace.c
+++ b/regress/sys/kern/ptrace/ptrace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ptrace.c,v 1.1 2005/07/20 15:31:43 art Exp $ */
+/* $OpenBSD: ptrace.c,v 1.2 2005/07/20 16:16:04 art Exp $ */
/*
* Copyright (c) 2005 Artur Grabowski <art@openbsd.org>
*
@@ -23,6 +23,7 @@
#include <stdio.h>
#include <unistd.h>
#include <signal.h>
+#include <errno.h>
static void
usage(void)
@@ -129,7 +130,10 @@ main(int argc, char **argv)
if (ptrace(PT_IO, pid, (caddr_t)&piod, 0) == -1) {
warn("ptrace(PT_IO)");
- ret = -1;
+ if (errno == EFAULT)
+ ret = 1;
+ else
+ ret = -1;
goto out;
}