Qp0wChkPid()--Check Status for Process ID


  Syntax
 #include <sys/types.h>
 #include <qp0wpid.h>

 int Qp0wChkPid(pid_t pid,
                QP0W_PID_Data_T *pidinfo);  

  Service Program Name: QP0WPID

  Default Public Authority: *USE

  Threadsafe: Yes

The Qp0wChkPid() function returns the status and process table entry information for the process specified by the process ID pid.


Parameters

pid
(Input) The process ID of the process whose process table information is to be returned. When pid has a value of binary 0, the process table information for the current process is returned.

*pidinfo
(Output) A pointer to the QP0W_PID_Data_T structure. The process table entry information for the process identified by pid is stored in the location pointed to by the pidinfo parameter.

The structure QP0W_PID_Data_T is defined in <qp0wpid.h> header file as follows:

typedef struct QP0W_PID_Data_T {
    pid_t         pid;
    pid_t         ppid;
    pid_t         pgrp;
    int           status;
    unsigned int  exit_status;
} QP0W_PID_Data_T;

The members of the QP0W_PID_Data_T structure are as follows:



Authorities

The process calling Qp0wChkPid() must have the appropriate authority to the process being examined. A process is allowed to examine the process table information for a process if at least one of the following conditions is true:


Return Value



Usage Notes

The Qp0wChkPid() function provides an IBM® i-specific way to obtain the process table information for the specified process.

Related Information



API introduced: V3R6

[ Back to top | UNIX-Type APIs | APIs by category ]