[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 1

kpidstate Subroutine

Purpose

Returns the status of a process.

Syntax

kpidstate (pid)
pid_t pid;

Description

The kpidstate subroutine returns the state of a process specified by the pid parameter. The kpidstate subroutine can only be called by a process.

Parameters

pid Specifies the product ID.

Return Values

If the pid parameter is not valid, KP_NOTFOUND is returned. If the pid parameter is valid, the following settings in the process state determine what is returned:

SNONE Return KP_NOTFOUND.
SIDL Return KP_INITING.
SZOMB Return KP_EXITING, also if SEXIT in pv_flag.
SSTOP Return KP_STOPPED.

Otherwise the pid is alive and KP_ALIVE is returned.

Error Codes

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]