dg_process_info(2) DG/UX 5.4.2 dg_process_info(2)
NAME
dgprocessinfo - get information about the system's currently active
processes
SYNOPSIS
#include <sys/dgprocessinfo.h>
int dgprocessinfo (selector,
selectorvalue,
cmdnameformat,
keyptr,
bufferptr,
version)
long selector;
long selectorvalue;
long cmdnameformat;
long * keyptr;
struct dgprocessinfo * bufferptr;
long version;
where:
selector A condition for determining which process to
report information about
selectorvalue A value for the select condition above
cmdnameformat One of three values
(DG_PROCESS_INFO_CMD_NAME_NULL,
DG_PROCESS_INFO_CMD_NAME_ONLY, or
DG_PROCESS_INFO_CMD_NAME_AND_ARGS) specifying
whether the command name alone is sufficient, or
if the command name with its arguments is needed.
keyptr On the first call, a pointer to a variable
containing the value DG_PROCESS_INFO_INITIAL_KEY;
on return, a handle that should be used on
subsequent calls to this system call
bufferptr A pointer to a buffer of structure
dgprocessinfo where the process information
will be returned
version To use the most recent version, version should be
set to DG_PROCESS_INFO_CURRENT_VERSION.
DESCRIPTION
The dgprocessinfo system call 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 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
Licensed material--property of copyright holder(s) 1
dg_process_info(2) DG/UX 5.4.2 dg_process_info(2)
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. keyptr 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.
DIAGNOSTICS
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 keyptr argument specifies a bad address
EFAULT The bufferptr argument specifies a bad address
SEE ALSO
killall(1M), dgsysinfo(2), fork(2), vfork(2).
Licensed material--property of copyright holder(s) 2