diff options
author | 1999-02-01 08:13:01 +0000 | |
---|---|---|
committer | 1999-02-01 08:13:01 +0000 | |
commit | 2879b7bc6c32607cf98ba3d043843ecac619119c (patch) | |
tree | 4a4011963a208d3ad7abaac6e281da1263d5a27c /lib/libc/sys/ptrace.c | |
parent | malloc can't use write() if it fails very early, so use the unwrapped syscall _thread_sys_write() if we are threaded (diff) | |
download | wireguard-openbsd-2879b7bc6c32607cf98ba3d043843ecac619119c.tar.xz wireguard-openbsd-2879b7bc6c32607cf98ba3d043843ecac619119c.zip |
mi ptrace
Diffstat (limited to 'lib/libc/sys/ptrace.c')
-rw-r--r-- | lib/libc/sys/ptrace.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/libc/sys/ptrace.c b/lib/libc/sys/ptrace.c new file mode 100644 index 00000000000..5e95a94941c --- /dev/null +++ b/lib/libc/sys/ptrace.c @@ -0,0 +1,21 @@ +/* $OpenBSD: ptrace.c,v 1.1 1999/02/01 08:13:01 d Exp $ */ +/* David Leonard <d@openbsd.org>, 1999. Public domain. */ + +#include <sys/types.h> +#include <sys/ptrace.h> +#include <sys/errno.h> + +int _ptrace __P((int, pid_t, caddr_t, int)); + +int +ptrace(request, pid, addr, data) + int request; + pid_t pid; + caddr_t addr; + int data; +{ + + /* ptrace(2) is documented to clear errno on success: */ + errno = 0; + return (_ptrace(request, pid, addr, data)); +} |