mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 21:59:07 +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
Notes:
sideshowbarker
2024-07-18 05:42:31 +09:00
Author: https://github.com/sin-ack
Commit: 2830a0ecda
Pull-request: https://github.com/SerenityOS/serenity/pull/9410
Reviewed-by: https://github.com/awesomekling
7 changed files with 143 additions and 61 deletions
|
@ -260,6 +260,11 @@ Process::Process(const String& name, uid_t uid, gid_t gid, ProcessID ppid, bool
|
|||
m_protected_values.suid = uid;
|
||||
m_protected_values.sgid = gid;
|
||||
|
||||
auto maybe_procfs_traits = ProcessProcFSTraits::try_create({}, make_weak_ptr());
|
||||
// NOTE: This can fail, but it should be very, *very* rare.
|
||||
VERIFY(!maybe_procfs_traits.is_error());
|
||||
m_procfs_traits = maybe_procfs_traits.release_value();
|
||||
|
||||
dbgln_if(PROCESS_DEBUG, "Created new process {}({})", m_name, this->pid().value());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue