blob: e6b809c2737a3acad50fd90b9976b2826013068c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// This source code is released into the public domain.
export module nihil.posix:execl;
import nihil.std;
import :argv;
import :execv;
import :fd;
namespace nihil {
// execl: equivalent to execv, except the arguments are passed as a
// variadic pack of string-like objects.
export [[nodiscard]] auto execl(std::filesystem::path path, auto &&...args) -> execv
{
return execv(std::move(path), argv({std::string_view(args)...}));
}
export [[nodiscard]] auto execl(fd &&executable, auto &&...args) -> execv
{
return execv(std::move(executable), argv({std::string_view(args)...}));
}
} // namespace nihil
|