summaryrefslogtreecommitdiff
path: root/Shell/Shell.h
diff options
context:
space:
mode:
authorAnotherTest <ali.mpfard@gmail.com>2020-05-26 18:45:19 +0430
committerAndreas Kling <kling@serenityos.org>2020-05-27 11:13:02 +0200
commitd5e9213683591edb394b5252b418695650e07dc8 (patch)
tree3b80c1f8513f5d1d66e840e101148a04bce24d89 /Shell/Shell.h
parent70a213a6ec19aeee99af6a747c5b12890c038690 (diff)
downloadserenity-d5e9213683591edb394b5252b418695650e07dc8.zip
Shell: Avoid messing with sigaction while waiting for a child
Diffstat (limited to 'Shell/Shell.h')
-rw-r--r--Shell/Shell.h3
1 files changed, 3 insertions, 0 deletions
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<Line::CompletionSuggestion> 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)