diff --git a/man2/ptrace.2 b/man2/ptrace.2 index 5a8b648..0e7ca08 100644 --- a/man2/ptrace.2 +++ b/man2/ptrace.2 @@ -374,6 +374,10 @@ value such that status>>8 == (SIGTRAP | (PTRACE_EVENT_EXEC<<8)) .fi +If execing thread is not a thread group leader, thread ID +is reset to thread group leader's ID before this stop. +Since Linux 3.0, the former thread ID can be retrieved with +.BR PTRACE_GETEVENTMSG . .TP .BR PTRACE_O_TRACEVFORKDONE " (since Linux 2.5.60)" Stop the tracee at the completion of the next @@ -1018,6 +1022,9 @@ can be used to retrieve the new thread's ID. .B PTRACE_EVENT_EXEC Stop before return from .BR execve (2). +Since Linux 3.0, +.BR PTRACE_GETEVENTMSG +returns the former thread ID. .TP .B PTRACE_EVENT_EXIT Stop before exit (including death from @@ -1039,7 +1046,8 @@ to finish exiting. on .B PTRACE_EVENT stops returns -.B SIGTRAP in +.B SIGTRAP +in .IR si_signo , with .I si_code