diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-08-23 13:22:23 +0700 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-08-23 13:33:13 +0700 |
| commit | f7bed9eb183def6ad1e96df96c13fd22551fbf42 (patch) | |
| tree | c7d6badd4c15c415bc2b81b179ee7a856bb259bb /src/remote.hh | |
| parent | 3efc406d571d651ed44b751eb798cc79a990c614 (diff) | |
Support specifying an exit status on `quit` commands
The current client exit status can be specified as an optional
parameter, is nothing is given the exit status will be 0.
Fixes #1230
Diffstat (limited to 'src/remote.hh')
| -rw-r--r-- | src/remote.hh | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/remote.hh b/src/remote.hh index b0cad37c..84382dc4 100644 --- a/src/remote.hh +++ b/src/remote.hh @@ -13,10 +13,7 @@ namespace Kakoune struct disconnected : runtime_error { - disconnected(String what, bool graceful = false) - : runtime_error{std::move(what)}, m_graceful{graceful} {} - - const bool m_graceful; + using runtime_error::runtime_error; }; class FDWatcher; @@ -36,10 +33,12 @@ public: const EnvVarMap& env_vars, StringView init_command, Optional<BufferCoord> init_coord); + const Optional<int>& exit_status() const { return m_exit_status; } private: std::unique_ptr<UserInterface> m_ui; std::unique_ptr<FDWatcher> m_socket_watcher; RemoteBuffer m_send_buffer; + Optional<int> m_exit_status; }; void send_command(StringView session, StringView command); |
