aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.posix
diff options
context:
space:
mode:
authorLexi Winter <lexi@le-fay.org>2025-07-02 00:40:02 +0100
committerLexi Winter <lexi@le-fay.org>2025-07-02 00:40:02 +0100
commitf52c343ab804b8469fda67d62383f84277577c93 (patch)
treeadc7fe10f96dc51a8211b74658bb1bf04c2227c4 /nihil.posix
parent8c9688fff4446a1b0f5fe9a9be0c50084726cc4d (diff)
downloadnihil-f52c343ab804b8469fda67d62383f84277577c93.tar.gz
nihil-f52c343ab804b8469fda67d62383f84277577c93.tar.bz2
nihil.std: adding some missing bits
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: