getppidx Kernel Service

Purpose

Gets the parent process ID of the specified process.

Syntax

#include <sys/types.h> 
#include <sys/errno.h>

pid_t getppidx ( ProcessID)
pid_t ProcessID;

Parameter

Item Description
ProcessID Specifies the process ID. If this parameter is 0, then the parent process ID of the calling process will be returned.

Description

The getppidx kernel service returns the parent process ID of the specified process.

Execution Environment

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

Return Values

Item Description
-1 Indicates that the ProcessID parameter is invalid.

The getppidx service returns the parent process ID of the calling process.