From d5e9213683591edb394b5252b418695650e07dc8 Mon Sep 17 00:00:00 2001 From: AnotherTest Date: Tue, 26 May 2020 18:45:19 +0430 Subject: Shell: Avoid messing with sigaction while waiting for a child --- Shell/Shell.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Shell/Shell.h') diff --git a/Shell/Shell.h b/Shell/Shell.h index 63be56c69a..b397757ff8 100644 --- a/Shell/Shell.h +++ b/Shell/Shell.h @@ -115,6 +115,8 @@ public: void highlight(Line::Editor&) const; Vector complete(const Line::Editor&); + bool is_waiting_for(pid_t pid) const { return m_waiting_for_pid == pid; } + String get_history_path(); void load_history(); void save_history(); @@ -187,6 +189,7 @@ private: StringBuilder m_complete_line_builder; bool m_should_break_current_command { false }; bool m_should_ignore_jobs_on_next_exit { false }; + pid_t m_waiting_for_pid { -1 }; }; static constexpr bool is_word_character(char c) -- cgit v1.2.3