dgprocessinfo(2) DG/UX 4.30 dgprocessinfo(2)
NAME
dg_process_info - Returns information about the system's
currently active processes.
SYNOPSIS
#include <sys/dg_process_info.h>
int dg_process_info (selector,
selector_value,
cmd_name_format,
key_ptr,
buffer_ptr,
version)
long selector;
long selector_value;
long cmd_name_format;
long * key_ptr;
struct dg_process_info * buffer_ptr;
long version;
PARAMETERS
selector Selects a condition for determining which
process to report information about.
selector_value Gives a value for the select condition above.
cmd_name_format
Can take on one of three values,
DG_PROCESS_INFO_CMD_NAME_NULL,
DG_PROCESS_INFO_CMD_NAME_ONLY, or
DG_PROCESS_INFO_CMD_NAME_AND_ARGS. Specifies
whether the command name alone is sufficient,
or if the command name with its arguments is
needed.
key_ptr On the first call, key-ptr should be a
pointer to a variable containing the value,
DG_PROCESS_INFO_INITIAL_KEY. On return this
argument contains a handle that should be
used on subsequent calls to this system call.
buffer_ptr A pointer to a buffer of structure
dgprocessinfo where the process information
will be returned.
version The version of this call. Currently only
DG_PROCESS_INFO_VERSION_0 is supported.
DESCRIPTION
Searches the process table for valid (non-free non-
initializing) table entries and based on the selector
determines whether or not to return information about that
Licensed material--property of copyright holder(s) Page 1
dgprocessinfo(2) DG/UX 4.30 dgprocessinfo(2)
process. Searching continues until a process is found
(return value (1)), or until the process table is completely
searched (return value (0)). Only one search through the
process table is made. If a process exists in a particular
slot in the process table when that slot is looked at,
information on that process will be returned. If the slot
is empty, no information will be returned.
ACCESS CONTROL
There are no checks for access control. All users can access
this system call
RETURN VALUE
1 Successful search, but not done. The buffer
was filled with information about a process.
key_ptr is given a handle which subsequent
calls to this routine will use to continue
the search through the process table.
0 Successful completion, that is, no more
processes. The contents of buffer are
undefined.
-1 An error occurred. Errno is set to indicate
the error
EXCEPTIONS
Errno may be set to one of the following error codes:
EINTR An interrupt occurred during the system call
EINVAL A bad argument was passed in.
EFAULT The key_ptr argument specifies a bad address
EFAULT The buffer_ptr argument specifies a bad
address
Licensed material--property of copyright holder(s) Page 2