K 10 svn:author V 3 kib K 8 svn:date V 27 2016-08-27T23:03:23.470470Z K 7 svn:log V 574 Do not obliterate errno value in the main thread during ptrace(2) call on x86. Since ptrace(2) syscall can return -1 for non-error situations, libc wrappers set errno to 0 before performing the syscall, as the service to the caller. On both i386 and amd64, the errno symbol was directly referenced, which only works correctly in single-threaded process. Change assembler wrappers for ptrace(2) to get current thread errno location by calling __error(). Allow __error interposing, as currently allowed in cerror(). Sponsored by: The FreeBSD Foundation MFC after: 1 week END