Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dg_process_info(2) — DG/UX 4.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought



                                                       dgprocessinfo(2)



        _________________________________________________________________
        dgprocessinfo                                       System Call
        Return information about currently active processes.
        _________________________________________________________________


        SYNTAX

        #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;
        dg_process_info_ptr_type 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, this value should be
                       DG_PROCESS_INFO_INITIAL_KEY.  On return this
                       argument contains a handle that should be used on
                       subsequent calls to this routine, or to
                       dg_process_file_info().


        buffer_ptr     A pointer to a buffer of struct
                       dg_process_info_type where the process information



        DG/UX 4.00                                                 Page 1
               Licensed material--property of copyright holder(s)





                                                       dgprocessinfo(2)



                       will be returned.


        version        The version of this call.  Currently only
                       DG_PROCESS_INFO_VERSION_0 is supported.


        DESCRIPTION

        Searches the pm_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 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 ie. no more processes.  The
                       <buffer>'s contents 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




        DG/UX 4.00                                                 Page 2
               Licensed material--property of copyright holder(s)





                                                       dgprocessinfo(2)



        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















































        DG/UX 4.00                                                 Page 3
               Licensed material--property of copyright holder(s)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026