Resource.Rlimit
Modifier and Type | Field and Description |
---|---|
static int |
HOST_NAME_MAX |
RB_AUTOBOOT, RB_DISABLE_CAD, RB_ENABLE_CAD, RB_HALT_SYSTEM, RB_KEXEC, RB_POWER_OFF, RB_SW_SUSPEND
RLIMIT_AS, RLIMIT_CORE, RLIMIT_CPU, RLIMIT_DATA, RLIMIT_FSIZE, RLIMIT_LOCKS, RLIMIT_MEMLOCK, RLIMIT_MSGQUEUE, RLIMIT_NICE, RLIMIT_NLIMITS, RLIMIT_NOFILE, RLIMIT_NPROC, RLIMIT_RSS, RLIMIT_RTPRIO, RLIMIT_RTTIME, RLIMIT_SIGPENDING, RLIMIT_STACK
Modifier and Type | Method and Description |
---|---|
int |
getdomainname(char[] name,
int len) |
int |
getegid() |
String |
getenv(String name) |
int |
geteuid() |
int |
getgid() |
int |
gethostname(char[] name,
int len) |
int |
getloadavg(double[] loadavg,
int nelem)
The getloadavg() function returns the number of processes in the system
run queue averaged over various periods of time.
|
int |
getuid() |
int |
setdomainname(char[] name,
int len) |
int |
setegid(int gid) |
int |
setenv(String name,
String value,
int overwrite)
Update or add a variable in the environment of the calling process.
|
int |
seteuid(int uid) |
int |
setgid(int gid) |
int |
sethostname(char[] name,
int len) |
int |
setuid(int uid) |
int |
unsetenv(String name) |
static final int HOST_NAME_MAX
int getuid()
int geteuid()
int getgid()
int getegid()
int setuid(int uid)
int seteuid(int uid)
int setgid(int gid)
int setegid(int gid)
int gethostname(char[] name, int len)
int sethostname(char[] name, int len)
int getdomainname(char[] name, int len)
int setdomainname(char[] name, int len)
String getenv(String name)
name
- Environment variable namenull
if there
is no match for the nameint setenv(String name, String value, int overwrite)
name
- Environment variable namevalue
- Required valueoverwrite
- If the environment variable already exists and the
value of overwrite
is non-zero, the function shall return
success and the environment shall be updated. If the environment
variable already exists and the value of overwrite
is zero, the
function shall return success and the environment shall remain unchanged.errno
set to indicate the error, and the
environment shall be unchangedint unsetenv(String name)
name
- Environment variable name - If the named variable does not
exist in the current environment, the environment shall be unchanged
and the function is considered to have completed successfully.errno
set to indicate the error, and the
environment shall be unchangedint getloadavg(double[] loadavg, int nelem)
loadavg
- An array of doubles which will be filled with the resultsnelem
- Number of samples to return