1 /* $OpenBSD: ptrace.c,v 1.4 2005/12/21 01:40:23 millert 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 _ptrace(int, pid_t, caddr_t, int); 9 10 int 11 ptrace(int request, pid_t pid, caddr_t addr, int data) 12 { 13 14 /* ptrace(2) is documented to clear errno on success: */ 15 errno = 0; 16 return (_ptrace(request, pid, addr, data)); 17 } 18