xref: /openbsd-src/lib/libc/sys/ptrace.c (revision 754df621918a52dedaaea6068260866a69a36579)
1 /*	$OpenBSD: ptrace.c,v 1.5 2016/03/30 07:55:36 guenther Exp $	*/
2 /* David Leonard <d@openbsd.org>, 1999. Public domain. */
3 
4 #include <sys/types.h>
5 #include <sys/ptrace.h>
6 #include <errno.h>
7 
8 int
WRAP(ptrace)9 WRAP(ptrace)(int request, pid_t pid, caddr_t addr, int data)
10 {
11 
12 	/* ptrace(2) is documented to clear errno on success: */
13 	errno = 0;
14 	return (ptrace(request, pid, addr, data));
15 }
16 DEF_WRAP(ptrace);
17