Get rid of bp::search_path
Boost filesystem was making some trouble when compiling with libc++. The
CI uses libc++ for LLVM builds, and the symbol names are different
between libc++ and libstdc++ (gnu). This difference would make the code
segfault inside Boost::filesystem. This patch gets rid of
Boost::filesystem linking.
Caveat: execAndWait now needs full file path.
Change-Id: Ia1abedc426f971884abda6c1ccbb897ad29c98ec
diff --git a/src/utils/exec.h b/src/utils/exec.h
index 3fd997c..80292b7 100644
--- a/src/utils/exec.h
+++ b/src/utils/exec.h
@@ -12,16 +12,16 @@
namespace velia::utils {
/**
- * Spawns a new process and waits until it returns. stdout is thrown away. Throws if the program has a non-zero exit
- * code with a message containing the stderr of the process.
+ * Spawns a new process with an executable specified by `absolutePath` and waits until it returns. stdout is thrown
+ * away. Throws if the program has a non-zero exit code with a message containing the stderr of the process.
*
* @param logger Logger to use.
- * @param program The name of the program to spawn. PATH is searched for this program.
+ * @param absolutePath Full path to the excutable.
* @param args Arguments to pass to the program. Can be {} if no arguments should be passed.
* @param std_in stdin input fo the program.
*/
enum class ExecOptions {
DropRoot
};
-void execAndWait(velia::Log logger, const std::string& program, std::initializer_list<std::string> args, std::string_view std_in, const std::set<ExecOptions> opts = {});
+void execAndWait(velia::Log logger, const std::string& absolutePath, std::initializer_list<std::string> args, std::string_view std_in, const std::set<ExecOptions> opts = {});
}