mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:58:13 +00:00
Kernel: Move ProcFS related overrides in Process to ProcessProcFSTraits
This allows us to 1) let go of the Process when an inode is ref'ing for ProcFSExposedComponent related reasons, and 2) change our ref/unref implementation.
This commit is contained in:
parent
748938ea59
commit
2830a0ecda
7 changed files with 143 additions and 61 deletions
|
@ -944,8 +944,9 @@ KResultOr<NonnullRefPtr<ProcFSExposedComponent>> ProcFSRootDirectory::lookup(Str
|
|||
auto actual_pid = pid.value();
|
||||
|
||||
auto maybe_process = Process::from_pid(actual_pid);
|
||||
if (maybe_process)
|
||||
return maybe_process.release_nonnull();
|
||||
if (maybe_process) {
|
||||
return maybe_process->procfs_traits();
|
||||
}
|
||||
return ENOENT;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue