summaryrefslogtreecommitdiff
path: root/Kernel/ProcessSpecificExposed.cpp
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2022-10-14 22:19:14 +0300
committerAndrew Kaster <andrewdkaster@gmail.com>2022-10-19 16:44:16 -0400
commite81cf66784d119fc8e27372aa2d98f1bbc2c7feb (patch)
treea86d13ec2788dde50f0f05d1f920bca42fe9cdee /Kernel/ProcessSpecificExposed.cpp
parent092b33c96e99a0cc5047545d6ad8a1a3f276ab49 (diff)
downloadserenity-e81cf66784d119fc8e27372aa2d98f1bbc2c7feb.zip
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.
Diffstat (limited to 'Kernel/ProcessSpecificExposed.cpp')
-rw-r--r--Kernel/ProcessSpecificExposed.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/ProcessSpecificExposed.cpp b/Kernel/ProcessSpecificExposed.cpp
index a714884e53..a0855478f3 100644
--- a/Kernel/ProcessSpecificExposed.cpp
+++ b/Kernel/ProcessSpecificExposed.cpp
@@ -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();
}