aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.posix/execlp.ccm
diff options
context:
space:
mode:
Diffstat (limited to 'nihil.posix/execlp.ccm')
-rw-r--r--nihil.posix/execlp.ccm10
1 files changed, 3 insertions, 7 deletions
diff --git a/nihil.posix/execlp.ccm b/nihil.posix/execlp.ccm
index ab3737c..12f2c24 100644
--- a/nihil.posix/execlp.ccm
+++ b/nihil.posix/execlp.ccm
@@ -1,12 +1,7 @@
// This source code is released into the public domain.
-module;
-
-#include <expected>
-#include <format>
-#include <string>
-
export module nihil.posix:execlp;
+import nihil.std;
import nihil.error;
import :argv;
import :execvp;
@@ -15,8 +10,9 @@ namespace nihil {
// execlp: equivalent to execvp, except the arguments are passed as a
// variadic pack of string-like objects.
+
export [[nodiscard]] auto
-execlp(std::string_view file, auto &&...args) -> std::expected<execv, error>
+execlp(std::filesystem::path const &file, auto &&...args) -> std::expected<execv, error>
{
return execvp(file, argv({std::string_view(args)...}));
}