|
@@ -785,13 +785,6 @@ void Process::finalize()
|
|
m_fds.with_exclusive([](auto& fds) { fds.clear(); });
|
|
m_fds.with_exclusive([](auto& fds) { fds.clear(); });
|
|
with_mutable_protected_data([&](auto& protected_data) { protected_data.tty = nullptr; });
|
|
with_mutable_protected_data([&](auto& protected_data) { protected_data.tty = nullptr; });
|
|
m_executable.with([](auto& executable) { executable = nullptr; });
|
|
m_executable.with([](auto& executable) { executable = nullptr; });
|
|
- m_jail_process_list.with([this](auto& list_ptr) {
|
|
|
|
- if (list_ptr) {
|
|
|
|
- list_ptr->attached_processes().with([&](auto& list) {
|
|
|
|
- list.remove(*this);
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
m_attached_jail.with([](auto& jail) {
|
|
m_attached_jail.with([](auto& jail) {
|
|
if (jail)
|
|
if (jail)
|
|
jail->detach({});
|
|
jail->detach({});
|
|
@@ -845,6 +838,17 @@ void Process::unblock_waiters(Thread::WaitBlocker::UnblockFlags flags, u8 signal
|
|
waiter_process->m_wait_blocker_set.unblock(*this, flags, signal);
|
|
waiter_process->m_wait_blocker_set.unblock(*this, flags, signal);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+void Process::remove_from_secondary_lists()
|
|
|
|
+{
|
|
|
|
+ m_jail_process_list.with([this](auto& list_ptr) {
|
|
|
|
+ if (list_ptr) {
|
|
|
|
+ list_ptr->attached_processes().with([&](auto& list) {
|
|
|
|
+ list.remove(*this);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+}
|
|
|
|
+
|
|
void Process::die()
|
|
void Process::die()
|
|
{
|
|
{
|
|
auto expected = State::Running;
|
|
auto expected = State::Running;
|