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:
parent
3a7a689b87
commit
151e4d41ed
5 changed files with 49 additions and 35 deletions
|
@ -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; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue