1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2026-01-15 08:51:00 +00:00

Fix some issues uncovered by the spawn stress test.

This commit is contained in:
Andreas Kling 2018-12-26 22:02:24 +01:00
parent f6179ad9f9
commit 3f3535213b
5 changed files with 9 additions and 7 deletions

View file

@ -189,7 +189,8 @@ void ProcFS::remove_process(Process& process)
InterruptDisabler disabler;
auto pid = process.pid();
auto it = m_pid2inode.find(pid);
ASSERT(it != m_pid2inode.end());
if (it == m_pid2inode.end())
return;
bool success = remove_file((*it).value);
ASSERT(success);
m_pid2inode.remove(pid);