Add a function for splitting search paths

This commit is contained in:
Robbert van der Helm
2022-04-14 18:00:11 +02:00
parent a5ded46f27
commit 8d40341ade
2 changed files with 30 additions and 0 deletions
+6
View File
@@ -41,6 +41,12 @@
*/
bool pid_running(pid_t pid);
/**
* Split a `PATH`-like environment variable on colons. These environment
* variables don't support escaping, which makes this a lot simpler.
*/
std::vector<ghc::filesystem::path> split_path(const std::string_view& path_env);
/**
* Helper to create an `environ`-like environment object for passing to the
* `exec*e()` family of functions.