aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.posix
diff options
context:
space:
mode:
Diffstat (limited to 'nihil.posix')
-rw-r--r--nihil.posix/execv.ccm9
1 files changed, 6 insertions, 3 deletions
diff --git a/nihil.posix/execv.ccm b/nihil.posix/execv.ccm
index cd501f7..3bf5745 100644
--- a/nihil.posix/execv.ccm
+++ b/nihil.posix/execv.ccm
@@ -35,7 +35,8 @@ export struct execv final
execv(fd &&executable, argv &&argv) noexcept
: m_executable(std::move(executable))
, m_args(std::move(argv))
- {}
+ {
+ }
~execv() = default;
@@ -52,13 +53,14 @@ export struct execv final
{
auto guard = save_errno();
+ // clang-format off
return self.m_executable | match {
- [&] (std::filesystem::path const &path) {
+ [&](std::filesystem::path const &path) {
::execv(path.string().c_str(), self.m_args.data());
return std::unexpected(error("execve failed", error(sys_error())));
},
- [&] (fd const &file) {
+ [&](fd const &file) {
#if NIHIL_HAVE_FEXECVE == 1
::fexecve(file.get(), self.m_args.data(), environ);
return std::unexpected(error("execve failed", error(sys_error())));
@@ -68,6 +70,7 @@ export struct execv final
#endif
}
};
+ // clang-format on
}
private: