diff options
| author | Lexi Winter <lexi@le-fay.org> | 2025-07-02 00:40:02 +0100 |
|---|---|---|
| committer | Lexi Winter <lexi@le-fay.org> | 2025-07-02 00:40:02 +0100 |
| commit | f52c343ab804b8469fda67d62383f84277577c93 (patch) | |
| tree | adc7fe10f96dc51a8211b74658bb1bf04c2227c4 /nihil.posix/execv.ccm | |
| parent | 8c9688fff4446a1b0f5fe9a9be0c50084726cc4d (diff) | |
| download | nihil-f52c343ab804b8469fda67d62383f84277577c93.tar.gz nihil-f52c343ab804b8469fda67d62383f84277577c93.tar.bz2 | |
nihil.std: adding some missing bits
Diffstat (limited to 'nihil.posix/execv.ccm')
| -rw-r--r-- | nihil.posix/execv.ccm | 9 |
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: |
