bproc_pidghostnode

Name

bproc_pidghostnode -- Get the node a PID started on.

Synopsis

#include <sys/bproc.h>

int bproc_pidghostnode (int pid);

Arguments

pid

The process id

Description

Retrieves the node number associated with starting the given Process ID in the BProc unified process space. Typically, this will be the master node, but may be another node if the process called a BProc move function.

Return Value

Return the node number that the PID started on.

Returns BPROC_NODE_NONE if the PID isn't one that was moved through BProc or isn't a valid PID.

BUGS

This functions returns BPROC_NODE_NONE if there was an error accessing the BProc status file, or if pid was not found in the status file. There is currently no way to tell if BPROC_NODE_NONE resulted from an error or from pid not being masqueraded by BProc.

Errors

EACCES

The program does not have access to read the BProc status file.

ENOENT

The BProc status file does not exist.

ENOMEM

Insufficient kernel memory.

EMFILE

The limit of files that can be opened by the process has been reached.

ENFILE

The limit of files that can be opened by the system has been reached.

EAGAIN

The BProc status file has been locked.