diff options
| author | Lexi Winter <lexi@le-fay.org> | 2025-06-30 07:51:23 +0100 |
|---|---|---|
| committer | Lexi Winter <lexi@le-fay.org> | 2025-06-30 07:51:23 +0100 |
| commit | 034cd404a129103a8dd7747e6bd00ffd5550da93 (patch) | |
| tree | d27946517d4d9333abd26ac50bbd4a436093e2ce /nihil.posix/spawn.ccm | |
| parent | 3e7902f7d790a486d3d9cb978df193f07f3a6ad9 (diff) | |
| download | nihil-034cd404a129103a8dd7747e6bd00ffd5550da93.tar.gz nihil-034cd404a129103a8dd7747e6bd00ffd5550da93.tar.bz2 | |
refactoring
Diffstat (limited to 'nihil.posix/spawn.ccm')
| -rw-r--r-- | nihil.posix/spawn.ccm | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/nihil.posix/spawn.ccm b/nihil.posix/spawn.ccm index 9fa24e3..a185bb3 100644 --- a/nihil.posix/spawn.ccm +++ b/nihil.posix/spawn.ccm @@ -1,7 +1,4 @@ -/* - * This source code is released into the public domain. - */ - +// This source code is released into the public domain. module; /* @@ -29,7 +26,7 @@ export module nihil.posix:spawn; import nihil.monad; import :argv; -import :exec; +import :executor; import :open; import :process; @@ -152,7 +149,7 @@ private: export [[nodiscard]] auto make_fd_file(int fdno, std::filesystem::path const &file, - int flags, int mode = 0777) + open_flags flags, int mode = 0777) -> std::expected<fd_file, error> { auto fd = co_await open(file, flags, mode); @@ -166,19 +163,19 @@ make_fd_file(int fdno, std::filesystem::path const &file, export [[nodiscard]] inline auto stdin_devnull() -> std::expected<fd_file, error> { - return make_fd_file(stdin_fileno, "/dev/null", O_RDONLY); + return make_fd_file(stdin_fileno, "/dev/null", open_read); } export [[nodiscard]] inline auto stdout_devnull() -> std::expected<fd_file, error> { - return make_fd_file(stdout_fileno, "/dev/null", O_WRONLY); + return make_fd_file(stdout_fileno, "/dev/null", open_write); } export [[nodiscard]] inline auto stderr_devnull() -> std::expected<fd_file, error> { - return make_fd_file(stderr_fileno, "/dev/null", O_WRONLY); + return make_fd_file(stderr_fileno, "/dev/null", open_write); } /* |
