setpinit Kernel Service

Purpose

Sets the parent of the current kernel process to the initialization process.

Syntax

#include <sys/types.h>
#include <sys/errno.h>
#include <sys/device.h>
int setpinit()

Description

The setpinit kernel service can be called by a kernel process to set its parent process to the init process. This is done to redirect the death of child signal for the termination of the kernel process. As a result, the init process is allowed to perform its default zombie process cleanup.

The setpinit service is used by a kernel process that can terminate, but does not want the user-mode process under which it was created to receive a death of child process notification.

Execution Environment

The setpinit kernel service can be called from the process environment only.

Return Values

Item Description
0 Indicates a successful operation.
EINVAL Indicates that the current process is not a kernel process.