From 942fc224af403de0a73511a4e6a5dfe4bfa53b91 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 8 Jun 2015 13:34:08 +0100 Subject: Specify if ShellManager should read output or not using a flag Some program (xclip), will fork a daemon keeping stdout/stderr open, so waiting for them to be closed make kakoune hang. Commands discarding stdout can then just not wait on it. --- src/shell_manager.hh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/shell_manager.hh') diff --git a/src/shell_manager.hh b/src/shell_manager.hh index fde507b6..36c74a3a 100644 --- a/src/shell_manager.hh +++ b/src/shell_manager.hh @@ -5,6 +5,7 @@ #include "regex.hh" #include "utils.hh" #include "env_vars.hh" +#include "flags.hh" namespace Kakoune { @@ -20,8 +21,15 @@ class ShellManager : public Singleton public: ShellManager(); + enum class Flags + { + None = 0, + ReadOutput = 1 + }; + std::pair eval(StringView cmdline, const Context& context, StringView input = {}, + Flags flags = Flags::ReadOutput, ConstArrayView params = {}, const EnvVarMap& env_vars = EnvVarMap{}); @@ -32,6 +40,8 @@ private: Vector> m_env_vars; }; +template<> struct WithBitOps : std::true_type {}; + } #endif // shell_manager_hh_INCLUDED -- cgit v1.2.3