1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 20:18:12 +00:00

Shell: Put children in their own process groups and fix job control

This commit fixes job control by putting children in their own process
group, and proxying TTY signals to active jobs.
This also cleans up the code around builtin_disown a bit to use
the newer job interfaces.
This commit is contained in:
AnotherTest 2020-07-12 18:51:47 +04:30 committed by Andreas Kling
parent 3a7a689b87
commit 151e4d41ed
5 changed files with 49 additions and 35 deletions

View file

@ -75,6 +75,11 @@ public:
bool should_be_disowned() const { return m_should_be_disowned; }
void disown() { m_should_be_disowned = true; }
bool is_running_in_background() const { return m_running_in_background; }
void unblock() const
{
if (!m_exited && on_exit)
on_exit(*this);
}
Function<void(RefPtr<Job>)> on_exit;
Core::ElapsedTimer& timer() { return m_command_timer; }