mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-31 12:54:11 +00:00
Kernel: Add /proc/{pid}/children to ProcFS
This exposes the child processes for a process as a directory of symlinks to the respective /proc entries for each child. This makes for an easier and possibly more efficient way to find and count a process's children. Previously the only method was to parse the entire /proc/all JSON file.
This commit is contained in:
@@ -67,6 +67,11 @@ InodeIndex build_segmented_index_for_file_description(ProcessID pid, unsigned fd
|
||||
return build_segmented_index_with_unknown_property(pid, ProcessSubDirectory::OpenFileDescriptions, fd);
|
||||
}
|
||||
|
||||
InodeIndex build_segmented_index_for_children(ProcessID pid, ProcessID child_pid)
|
||||
{
|
||||
return build_segmented_index_with_unknown_property(pid, ProcessSubDirectory::Children, child_pid.value());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static size_t s_allocate_global_inode_index()
|
||||
|
||||
Reference in New Issue
Block a user