Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   ptrace    ( 2 )

трассировка процесса (process trace)

  Name  |  Synopsis  |  Description  |    Return value    |  Error  |  Conforming to  |  Note  |  Bugs  |  See also  |

Возвращаемое значение (Return value)

On success, the PTRACE_PEEK* requests return the requested data (but see NOTES), the PTRACE_SECCOMP_GET_FILTER request returns the number of instructions in the BPF program, the PTRACE_GET_SYSCALL_INFO request returns the number of bytes available to be written by the kernel, and other requests return zero.

On error, all requests return -1, and errno is set to indicate the error. Since the value returned by a successful PTRACE_PEEK* request may be -1, the caller must clear errno before the call, and then check it afterward to determine whether or not an error occurred.