long ptrace(enum __ptrace_request request, pid_t pid,
void *addr, void *data);
The ptrace() system call provides a means by which
one process (the "tracer") may observe and control the execution of another process (the "tracee"),
and examine and change the tracee's memory and registers.
It is primarily used to implement breakpoint debugging and system call tracing.
wait is used to wait for state changes in a child of the calling process,
A state change is considered to be:
the child terminated;
the child was stopped by a signal;
or the child was resumed by a signal.
If a child has already changed state, then these calls return immediately.
Otherwise, they block until either a child changes state。