mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 20:42:21 +00:00
Kernel: Don't assume paths to children PID directories in ProcFS code
Instead of using absolute paths which is considered an abstraction layer violation between the kernel and userspace, let's not hardcode the path to children PID directories but instead we can use relative path links to them.
This commit is contained in:
parent
092b33c96e
commit
e81cf66784
Notes:
sideshowbarker
2024-07-17 05:18:48 +09:00
Author: https://github.com/supercomputer7
Commit: e81cf66784
Pull-request: https://github.com/SerenityOS/serenity/pull/15595
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/kleinesfilmroellchen ✅
1 changed files with 1 additions and 1 deletions
|
@ -112,7 +112,7 @@ ErrorOr<NonnullLockRefPtr<Inode>> Process::lookup_children_directory(ProcFS cons
|
|||
|
||||
ErrorOr<size_t> Process::procfs_get_child_proccess_link(ProcessID child_pid, KBufferBuilder& builder) const
|
||||
{
|
||||
TRY(builder.appendff("/proc/{}", child_pid.value()));
|
||||
TRY(builder.appendff("../../{}", child_pid.value()));
|
||||
return builder.length();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue