summaryrefslogtreecommitdiff
path: root/Base
diff options
context:
space:
mode:
authorBrendan Coles <bcoles@gmail.com>2020-12-16 23:49:55 +0000
committerAndreas Kling <kling@serenityos.org>2020-12-17 19:39:56 +0100
commit853664bd3c9167f3ed2433879ef33f287fde3043 (patch)
treedc98d6c3d5299cdd743629e8ecfb87703af08652 /Base
parent3436317c0831e460179a41d2b560c92995b1a21a (diff)
downloadserenity-853664bd3c9167f3ed2433879ef33f287fde3043.zip
LibC: stdlib: Add clearenv() function
Diffstat (limited to 'Base')
-rw-r--r--Base/usr/share/man/man3/clearenv.md34
1 files changed, 34 insertions, 0 deletions
diff --git a/Base/usr/share/man/man3/clearenv.md b/Base/usr/share/man/man3/clearenv.md
new file mode 100644
index 0000000000..42185419b9
--- /dev/null
+++ b/Base/usr/share/man/man3/clearenv.md
@@ -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;
+}
+```