summaryrefslogtreecommitdiffstats
path: root/Source/cmServerConnection.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmServerConnection.h')
-rw-r--r--Source/cmServerConnection.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/Source/cmServerConnection.h b/Source/cmServerConnection.h
index 78842e7..3efe28d 100644
--- a/Source/cmServerConnection.h
+++ b/Source/cmServerConnection.h
@@ -24,7 +24,7 @@ public:
bool ProcessEvents(std::string* errorMessage);
void ReadData(const std::string& data);
- void HandleEof();
+ void TriggerShutdown();
void WriteData(const std::string& data);
void ProcessNextRequest();
@@ -51,6 +51,8 @@ private:
uv_loop_t* mLoop = nullptr;
cmFileMonitor* mFileMonitor = nullptr;
cmServer* Server = nullptr;
+ uv_signal_t* SIGINTHandler = nullptr;
+ uv_signal_t* SIGHUPHandler = nullptr;
friend class LoopGuard;
};
@@ -58,6 +60,7 @@ private:
class cmServerStdIoConnection : public cmServerConnection
{
public:
+ cmServerStdIoConnection();
bool DoSetup(std::string* errorMessage) override;
void TearDown() override;
@@ -65,10 +68,12 @@ public:
private:
typedef union
{
- uv_tty_t tty;
- uv_pipe_t pipe;
+ uv_tty_t* tty;
+ uv_pipe_t* pipe;
} InOutUnion;
+ bool usesTty = false;
+
InOutUnion Input;
InOutUnion Output;
};
@@ -85,6 +90,6 @@ public:
private:
const std::string PipeName;
- uv_pipe_t ServerPipe;
- uv_pipe_t ClientPipe;
+ uv_pipe_t* ServerPipe = nullptr;
+ uv_pipe_t* ClientPipe = nullptr;
};