mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:17:46 +00:00
Inspector: Don't allow to inspect Inspector itself
The Inspector hangs when user tries to do that.
This commit is contained in:
parent
5338708091
commit
899698c317
1 changed files with 5 additions and 0 deletions
|
@ -111,6 +111,11 @@ int main(int argc, char** argv)
|
|||
return 1;
|
||||
}
|
||||
|
||||
if (pid == getpid()) {
|
||||
GUI::MessageBox::show(window, "Cannot inspect Inspector itself!", "Error", GUI::MessageBox::Type::Error);
|
||||
return 1;
|
||||
}
|
||||
|
||||
auto all_processes = Core::ProcessStatisticsReader::get_all();
|
||||
for (auto& it : all_processes.value()) {
|
||||
if (it.value.pid != pid)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue