11 template<
typename TPoller>
12 TPipe(TPoller& poller,
const std::string& exe,
const std::vector<std::string>& args)
17 ReadHandle = std::make_unique<TPipeFileHandle<TPoller>>(PipeLow.ReadFd, poller);
18 WriteHandle = std::make_unique<TPipeFileHandle<TPoller>>(PipeLow.WriteFd, poller);
26 TPipeLow(
const std::string& exe,
const std::vector<std::string>& args);
32 std::vector<std::string> Args;
39 struct TTypelessFileHandle {
40 virtual ~TTypelessFileHandle() =
default;
45 template<
typename TPoller>
46 struct TPipeFileHandle :
public TTypelessFileHandle {
47 TPipeFileHandle(
int fd, TPoller& poller)
52 co_return co_await Handle.ReadSome(buffer, size);
55 co_return co_await Handle.WriteSome(buffer, size);
58 typename TPoller::TFileHandle Handle;
62 std::unique_ptr<TTypelessFileHandle> ReadHandle;
63 std::unique_ptr<TTypelessFileHandle> WriteHandle;