Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys



Module Name:    src
Committed By:   kamil
Date:           Wed Oct  9 13:19:43 UTC 2019

Modified Files:
        src/sys/kern: sys_ptrace_common.c
        src/sys/sys: ptrace.h

Log Message:
Introduce new ptrace(2) operation PT_STOP

It works like:

 - kill(SIGSTOP) for unstopped tracee
 - ptrace(PT_CONTINUE,SIGSTOP) for stopped tracee

The child will be stopped and always possible to be waited (with wait(2)
like calls).

For stopped traccee kill(SIGSTOP) has no effect. PT_CONTINUE+SIGSTOP cannot
be used on an unstopped process (EBUSY).

This operation is modeled after PT_KILL that is similar for the SIGKILL
call. While there, allow PT_KILL on unstopped traced child.

This operation is useful in an abnormal exit of a debugger from a signal
handler, usually followed by waitpid(2) and ptrace(PT_DETACH).


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/kern/sys_ptrace_common.c
cvs rdiff -u -r1.65 -r1.66 src/sys/sys/ptrace.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index