reparent_to_init(9)

reparent_to_init9

Reparent the calling kernel thread to the init task.

Usage

void reparent_to_init(void);

Arguments

void

no arguments

Overview

If a kernel thread is launched as a result of a system call, or if it ever exits, it should generally reparent itself to init so that it is correctly cleaned up on exit.

The various task state such as scheduling policy and priority may have been inherited from a user process, so we reset them to sane values here.

NOTE that reparent_to_init gives the caller full capabilities.

From linux-manual-2.6.18 2.6.18.dfsg.1-26etch2 in Debian 4.0 (Etch). Parsed by carta from the page's man source.