9#ifndef LIBLLDB_HOST_WINDOWS_PSEUDOCONSOLE_H_
10#define LIBLLDB_HOST_WINDOWS_PSEUDOCONSOLE_H_
12#include "llvm/Support/Error.h"
16#define PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE 0x20016
116 std::condition_variable
m_cv{};
PseudoConsole(const PseudoConsole &)=delete
PseudoConsole & operator=(const PseudoConsole &)=delete
llvm::Error OpenPseudoConsole()
Creates and opens a new ConPTY instance with a default console size of 80x25.
bool IsStopping() const
Returns whether the ConPTY is in the process of shutting down.
void ClosePipes()
Closes the STDIN and STDOUT pipe handles and invalidates them.
std::condition_variable & GetCV()
Returns a reference to the condition variable used to signal state changes to threads waiting on the ...
std::atomic< bool > m_stopping
std::condition_variable m_cv
std::mutex & GetMutex()
Returns a reference to the mutex used to synchronize access to the ConPTY state.
void SetStopping(bool value)
Sets the stopping flag to value, signalling to threads waiting on the ConPTY that they should stop.
PseudoConsole & operator=(PseudoConsole &&)=delete
HANDLE GetSTDOUTHandle() const
The STDOUT read HANDLE accessor.
void Close()
Closes the ConPTY and invalidates its handle, without closing the STDIN and STDOUT pipes.
llvm::Error DrainInitSequences()
Drains initialization sequences from the ConPTY output pipe.
bool IsConnected() const
Returns whether the ConPTY and its pipes are currently open and valid.
HPCON GetPseudoTerminalHandle()
The ConPTY HPCON handle accessor.
PseudoConsole(PseudoConsole &&)=delete
HANDLE GetSTDINHandle() const
The STDIN write HANDLE accessor.
A class that represents a running process on the host machine.