The explicit CONT on attach is needed in order for wait() to work on older kernels, and the STOP/CONT after attach is better at making bash notice the process is running again.
Thanks to Josh Dick for providing access to an ARM test and dev machine.
Start isolating x86-generic features into a common x86 header.
…hem. RHEL 5, in particular, supports all the options we need, but doesn't define them in userspace's ptrace.h.
Reported-by: Anders Kaseorg <email@example.com>
These are actually easier -- we just need to TIOCNOTTY, instead of playing games with a dummy child and setsid.
On some systems, including sys/user.h before sys/types.h causes a compiler error. Changing the order of the #includes fixes the error.
Use an error field in 'struct ptrace', and consistently return -1 on failure.