mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-22 17:31:58 -05: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…
Reference in a new issue