aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.posix/fexecv.cc
diff options
context:
space:
mode:
Diffstat (limited to 'nihil.posix/fexecv.cc')
-rw-r--r--nihil.posix/fexecv.cc47
1 files changed, 0 insertions, 47 deletions
diff --git a/nihil.posix/fexecv.cc b/nihil.posix/fexecv.cc
deleted file mode 100644
index ad57d14..0000000
--- a/nihil.posix/fexecv.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * This source code is released into the public domain.
- */
-
-module;
-
-#include <coroutine>
-#include <expected>
-#include <format>
-#include <string>
-#include <utility>
-
-#include <err.h>
-
-#include "nihil.h"
-
-#ifdef NIHIL_HAVE_FEXECVE
-
-extern char **environ;
-
-module nihil.posix;
-
-import nihil.error;
-import nihil.monad;
-
-namespace nihil {
-
-fexecv::fexecv(fd &&execfd, argv &&args) noexcept
- : m_execfd(std::move(execfd))
- , m_args(std::move(args))
-{
-}
-
-auto fexecv::exec(this fexecv &self)
- -> std::expected<void, error>
-{
- ::fexecve(self.m_execfd.get(), self.m_args.data(), environ);
- return std::unexpected(error("fexecve failed",
- error(std::errc(errno))));
-}
-
-fexecv::fexecv(fexecv &&) noexcept = default;
-auto fexecv::operator=(this fexecv &, fexecv &&) noexcept -> fexecv& = default;
-
-} // namespace nihil
-
-#endif // NIHIL_HAVE_FEXECVE