MCPcopy Create free account
hub / github.com/3rdparty/libprocess / PIPE

Method PIPE

src/posix/subprocess.cpp:47–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45
46
47Subprocess::IO Subprocess::PIPE()
48{
49 return Subprocess::IO(
50 []() -> Try<InputFileDescriptors> {
51 Try<array<int, 2>> pipefd = os::pipe();
52 if (pipefd.isError()) {
53 return Error(pipefd.error());
54 }
55
56 InputFileDescriptors fds;
57 fds.read = pipefd->at(0);
58 fds.write = pipefd->at(1);
59 return fds;
60 },
61 []() -> Try<OutputFileDescriptors> {
62 Try<array<int, 2>> pipefd = os::pipe();
63 if (pipefd.isError()) {
64 return Error(pipefd.error());
65 }
66
67 OutputFileDescriptors fds;
68 fds.read = pipefd->at(0);
69 fds.write = pipefd->at(1);
70 return fds;
71 });
72}
73
74
75Subprocess::IO Subprocess::PATH(const string& path)

Callers

nothing calls this directly

Calls 1

IOClass · 0.85

Tested by

no test coverage detected