LLDB mainline
PipeBase.cpp
Go to the documentation of this file.
1//===-- source/Host/common/PipeBase.cpp -----------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
10
11using namespace lldb_private;
12
13PipeBase::~PipeBase() = default;
14
15Status PipeBase::OpenAsWriter(llvm::StringRef name,
16 bool child_process_inherit) {
17 return OpenAsWriterWithTimeout(name, child_process_inherit,
18 std::chrono::microseconds::zero());
19}
20
21Status PipeBase::Read(void *buf, size_t size, size_t &bytes_read) {
22 return ReadWithTimeout(buf, size, std::chrono::microseconds::zero(),
23 bytes_read);
24}
virtual Status OpenAsWriterWithTimeout(llvm::StringRef name, bool child_process_inherit, const std::chrono::microseconds &timeout)=0
Status Read(void *buf, size_t size, size_t &bytes_read)
Definition: PipeBase.cpp:21
virtual Status ReadWithTimeout(void *buf, size_t size, const std::chrono::microseconds &timeout, size_t &bytes_read)=0
Status OpenAsWriter(llvm::StringRef name, bool child_process_inherit)
Definition: PipeBase.cpp:15
An error handling class.
Definition: Status.h:44
A class that represents a running process on the host machine.