aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/util.cc')
-rw-r--r--src/libutil/util.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index 341dedfdf..2391e14a9 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -73,6 +73,13 @@ std::map<std::string, std::string> getEnv()
}
+void clearEnv()
+{
+ for (auto & name : getEnv())
+ unsetenv(name.first.c_str());
+}
+
+
Path absPath(Path path, Path dir)
{
if (path[0] != '/') {