controller: Make action shell command local
This commit is contained in:
parent
9fb75779f3
commit
41ffc3607d
@ -84,7 +84,6 @@ class controller
|
||||
unique_ptr<bar> m_bar;
|
||||
unique_ptr<ipc> m_ipc;
|
||||
unique_ptr<inotify_watch> m_confwatch;
|
||||
unique_ptr<command<output_policy::IGNORED>> m_command;
|
||||
|
||||
array<unique_ptr<file_descriptor>, 2> m_queuefd{};
|
||||
|
||||
|
@ -567,15 +567,11 @@ void controller::process_inputdata() {
|
||||
// Run input as command if it's not an input for a module
|
||||
m_log.info("Forwarding command to shell... (input: %s)", cmd);
|
||||
|
||||
if (m_command) {
|
||||
m_log.warn("Terminating previous shell command");
|
||||
m_command->terminate();
|
||||
}
|
||||
|
||||
m_log.info("Executing shell command: %s", cmd);
|
||||
m_command = command_util::make_command<output_policy::IGNORED>(move(cmd));
|
||||
m_command->exec();
|
||||
m_command.reset();
|
||||
|
||||
auto shell_cmd = command_util::make_command<output_policy::IGNORED>(move(cmd));
|
||||
shell_cmd->exec();
|
||||
shell_cmd.reset();
|
||||
process_update(true);
|
||||
} catch (const application_error& err) {
|
||||
m_log.err("controller: Error while forwarding input to shell -> %s", err.what());
|
||||
|
Loading…
Reference in New Issue
Block a user