wait_task_stopped(9)

wait_task_stopped9

Wait for task_stopped or task_traced

Usage

int wait_task_stopped(struct wait_opts * wo, int ptrace, struct task_struct * p);

Arguments

wo

wait options

ptrace

is the wait for ptrace

p

task to wait for

Overview

Handle sys_wait4 work for p in state TASK_STOPPED or TASK_TRACED.

Context

read_lock(tasklist_lock), which is released if return value is non-zero. Also, grabs and releases p->sighand->siglock.

Returns

0 if wait condition didn't exist and search for other wait conditions should continue. Non-zero return, -errno on failure and p's pid on success, implies that tasklist_lock is released and wait condition search should terminate.

Releases

2 releases since Debian 7 (Wheezy); the text changed 1 time.

  1. 7
  2. 8

From linux-manual-3.16 3.16.56-1+deb8u1 in Debian 8 (Jessie). Parsed by carta from the page's man source.