.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "REPARENT_TO_INIT" "9" "09 October 2005" "" ""
.SH NAME
reparent_to_init \- Reparent the calling kernel thread to the init task.
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
void reparent_to_init ( \fIvoid\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIvoid\fB\fR
no arguments
.SH "DESCRIPTION"
.PP
.PP
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.
.PP
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.
.PP
NOTE that \fBreparent_to_init\fR gives the caller full capabilities.