35class TerminalProcess_WindowsConPTY :
public ITerminalProcess
38 TerminalProcess_WindowsConPTY();
39 ~TerminalProcess_WindowsConPTY()
override;
41 bool Start(
const TerminalLaunchConfig& cfg, std::string& outError)
override;
42 bool WriteStdin(
const char* data,
size_t len)
override;
43 void RequestStop()
override;
44 void ForceKill()
override;
45 bool IsRunning()
const override {
return mRunning.load(); }
46 int GetExitCode()
const override {
return mExitCode.load(); }
48 bool IsTty()
const override {
return true; }
51 static bool IsConPtyAvailable();
56 void CloseAllHandles();
58 void* mProcess =
nullptr;
59 unsigned long mProcessId = 0;
60 void* mPseudoConsole =
nullptr;
62 void* mInputWrite =
nullptr;
63 void* mOutputRead =
nullptr;
65 void* mAttributeListMem =
nullptr;
67 std::unique_ptr<ITerminalOutputParser> mParser;
70 std::thread mWaitThread;
72 std::atomic<bool> mRunning{
false };
73 std::atomic<bool> mStopRequested{
false };
74 std::atomic<int> mExitCode{ 0 };
76 std::mutex mStdinMutex;
77 std::mutex mLifecycleMutex;