mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:37:35 +00:00
LibC: stdlib: Add clearenv() function
This commit is contained in:
parent
3436317c08
commit
853664bd3c
4 changed files with 46 additions and 1 deletions
34
Base/usr/share/man/man3/clearenv.md
Normal file
34
Base/usr/share/man/man3/clearenv.md
Normal file
|
@ -0,0 +1,34 @@
|
|||
## Name
|
||||
|
||||
clearenv - clear the environment
|
||||
|
||||
## Synopsis
|
||||
|
||||
```**c++
|
||||
#include <stdlib.h>
|
||||
|
||||
clearenv();
|
||||
```
|
||||
|
||||
## Description
|
||||
|
||||
Clears all environment variables and sets the external
|
||||
variable `environ` to NULL.
|
||||
|
||||
## Return value
|
||||
|
||||
The `clearenv()` function returns zero.
|
||||
|
||||
## Examples
|
||||
|
||||
```c++
|
||||
#include <stdlib.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
clearenv();
|
||||
putenv("PATH=/bin");
|
||||
|
||||
return 0;
|
||||
}
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue