Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ resource(5) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getrlimit(2)

getrusage(2)

getpriority(3)

lfs(5)

resource(5)                                                     resource(5)

NAME
     resource - definitions for resource operations

SYNOPSIS
     #include <sys/resource.h>

DESCRIPTION
     The <sys/resource.h> header defines the following symbolic constants
     as possible values of the which argument of getpriority() and
     setpriority():

     PRIOPROCESS          Identifies who argument as a process ID.

     PRIOPGRP             Identifies who argument as a process group ID.

     PRIOUSER             Identifies who argument as a user ID.

     The following type is defined through typedef:

     rlimt                Unsigned integral type used for limit values.

     The following symbolic constant is defined:

     RLIMINFINITY         A value of rlimt indicating no limit.

     The following symbolic constants are defined as possible values of the
     who parameter of getrusage():

     RUSAGESELF           Returns information about the current process.

     RUSAGECHILDREN       Returns information about children of the
                           current process.

     The <sys/resource.h> header defines the rlimit structure that includes
     at least the following members:

     rlimt rlimcur       The current (soft) limit.

     rlimt rlimmax       The hard limit.

     The <sys/resource.h> header defines the rusage structure that includes
     at least the following members:

     struct timeval ruutime       User time used.

     struct timeval rustime       System time used.

     The timeval structure is defined as described in <sys/time.h>.

     The following symbolic constants are defined as possible values for
     the resource argument of getrlimit() and setrlimit():




Page 1                       Reliant UNIX 5.44                Printed 11/98

resource(5)                                                     resource(5)

     RLIMITCORE           Limit on size of core dump file.

     RLIMITCPU            Limit on CPU time per process.

     RLIMITDATA           Limit on data segment size.

     RLIMITFSIZE          Limit on file size.

     RLIMITNOFILE         Limit on number of open files.

     RLIMITSTACK          Limit on stack size.

     RLIMITAS             Limit on address space size.

     The following are declared as functions and may also be defined as
     macros:

     int  getpriority(int which, idt who);
     int  getrlimit(int resource, struct rlimit *rlp);
     int  getrusage(int who, struct rusage *rusage);
     int  setpriority(int which, idt who, int priority);
     int  setrlimit(int resource, const struct rlimit *rlp);

     The idt type is defined through typedef as described in
     <sys/types.h>.

     Inclusion of the <sys/resource.h> header may also make visible all
     symbols from <sys/time.h>.

     The following symbolic constants are defined:

     RLIMSAVEDMAX        A value of type rlimt indicating an unrepresen-
                           table saved hard limit.

     RLIMSAVEDCUR        A value of type rlimt indicating an unrepresen-
                           table saved soft limit.

     On implementations where all resource limits are representable in an
     object of type rlimt, RLIMSAVEDMAX and RLIMSAVEDCUR need not be
     distinct from RLIMINFINITY.

     The following applies to the "explicit off_t" model.

     The following data type is defined through typedef:

     rlim64t              Type used for limit values.

     The type rlim64t must be an extended unsigned arithmetic type that
     can represent correctly any non-negative value of an off64t.





Page 2                       Reliant UNIX 5.44                Printed 11/98

resource(5)                                                     resource(5)

     The following symbolic constants are defined:

     RLIM64INFINITY       A value of type rlim64t indicating no limit.

     RLIM64SAVEDMAX      A value of type rlim64t indicating an
                           unrepresentable saved hard limit.

     RLIM64SAVEDCUR      A value of type rlim64t indicating an
                           unrepresentable saved soft limit.

     On implementations where all resource limits are representable in an
     object of type rlim64t, RLIM64SAVEDMAX and RLIM64SAVEDCUR need
     not be distinct from RLIM64INFINITY.

     The rlimit64 structure is defined in the same way as the rlimit struc-
     ture with the exception of the following members:

     rlim64t rlimcur             The current (soft) limit.

     rlim64t rlimmax             The hard limit.

     The following are declared as functions and may also be defined as
     macros:

     int getrlimit64(int resource, struct rlimit64 *rlp);

     int setrlimit64(int resource, const struct rlimit64 *rlp);

SEE ALSO
     getrlimit(2), getrusage(2), getpriority(3), lfs(5).
























Page 3                       Reliant UNIX 5.44                Printed 11/98

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