mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 11:48:32 +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:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user