Kernel: Add /proc/<pid>/exe

This commit is contained in:
2025-08-26 13:22:30 +03:00
parent e4abe75043
commit abbe7b79d6
3 changed files with 20 additions and 0 deletions

View File

@@ -226,6 +226,8 @@ namespace Kernel
size_t proc_cmdline(off_t offset, BAN::ByteSpan) const;
size_t proc_environ(off_t offset, BAN::ByteSpan) const;
BAN::StringView executable() const { return m_executable; }
// Returns error if page could not be allocated
// Returns true if the page was allocated successfully
// Return false if access was page violation (segfault)
@@ -339,6 +341,7 @@ namespace Kernel
BAN::Vector<BAN::String> m_cmdline;
BAN::Vector<BAN::String> m_environ;
BAN::String m_executable;
BAN::Vector<ChildExitStatus> m_child_exit_statuses;
ThreadBlocker m_child_exit_blocker;