---
name: "ptrace_trap_notify"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/ptrace_trap_notify"
---

# ptrace\_trap\_notify(9)

schedule trap to notify ptracer

## NAME

ptrace\_trap\_notify - schedule trap to notify ptracer

## SYNOPSIS

**void ptrace\_trap\_notify(struct task\_struct \*** *t***);**

## ARGUMENTS

*t*

tracee wanting to notify tracer

## DESCRIPTION

This function schedules sticky ptrace trap which is cleared on the next TRAP\_STOP to notify ptracer of an event. *t* must have been seized by ptracer.

If *t* is running, STOP trap will be taken. If trapped for STOP and ptracer is listening for events, tracee is woken up so that it can re-trap for the new event. If trapped otherwise, STOP trap will be eventually taken without returning to userland after the existing traps are finished by PTRACE\_CONT.

## CONTEXT

Must be called with *task*-\>sighand-\>siglock held.

## COPYRIGHT
