posix-next API 0.1.0
Out-of-tree Zephyr POSIX module
Loading...
Searching...
No Matches
POSIX_SINGLE_PROCESS
Implementation completeness: 100.0%100IMPLLine coverage: 100.0%100COVLinux compatibility tests: passing🐧

POSIX Single Process option group. More...

Files

file  confstr.h
 POSIX configuration string constants (<sys/confstr.h>)
 
file  sysconf.h
 POSIX runtime system configuration (<sys/sysconf.h>)
 
file  utsname.h
 POSIX system name identification (<sys/utsname.h>)
 

Functions

int setenv (const char *envname, const char *envval, int overwrite)
 Set the value of an environment variable.
 
int unsetenv (const char *name)
 Remove an environment variable.
 
int uname (struct utsname *name)
 Get the name of the current system.
 
size_t confstr (int name, char *buf, size_t len)
 Determine the value of a configurable system variable by name string.
 
long sysconf (int opt)
 Get a configurable system variable.
 

Detailed Description

POSIX Single Process option group.

Covers confstr(), sysconf(), getenv(), setenv(), uname(), unsetenv(), and related single-process environment functions.

Function Documentation

◆ confstr()

size_t confstr ( int  name,
char *  buf,
size_t  len 
)
confstr line coverage: 100.0%100Linux compatibility tests: passing🐧

Determine the value of a configurable system variable by name string.

See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/confstr.html

◆ setenv()

int setenv ( const char *  envname,
const char *  envval,
int  overwrite 
)
setenv line coverage: 100.0%100Linux compatibility tests: passing🐧

Set the value of an environment variable.

Parameters
envnameName of the variable (must not contain '=').
envvalNew value string.
overwriteNon-zero to overwrite an existing value; 0 to preserve it.
Returns
0 on success, or -1 with errno set on failure.
See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/setenv.html

◆ sysconf()

long sysconf ( int  opt)
sysconf line coverage: 100.0%100Linux compatibility tests: passing🐧

Get a configurable system variable.

See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/sysconf.html

◆ uname()

int uname ( struct utsname name)
uname line coverage: 100.0%100Linux compatibility tests: passing🐧

Get the name of the current system.

Parameters
nameOutput: system identification structure to fill in.
Returns
0 on success, or -1 with errno set on failure.
See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/uname.html

◆ unsetenv()

int unsetenv ( const char *  name)
unsetenv line coverage: 100.0%100Linux compatibility tests: passing🐧

Remove an environment variable.

Parameters
nameName of the variable to remove.
Returns
0 on success, or -1 with errno set on failure.
See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/unsetenv.html