mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
Add parent PIDs to /proc/summary
This commit is contained in:
parent
16f318408d
commit
86a547dcac
Notes:
sideshowbarker
2024-07-19 18:39:17 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/86a547dcac3
2 changed files with 5 additions and 2 deletions
|
@ -24,13 +24,14 @@ bool ProcFileSystem::initialize()
|
|||
auto stringImpl = StringImpl::createUninitialized(tasks.size() * 256, buffer);
|
||||
memset(buffer, 0, stringImpl->length());
|
||||
char* ptr = buffer;
|
||||
ptr += ksprintf(ptr, "PID OWNER STATE NSCHED FDS NAME\n");
|
||||
ptr += ksprintf(ptr, "PID OWNER STATE PPID NSCHED FDS NAME\n");
|
||||
for (auto* task : tasks) {
|
||||
ptr += ksprintf(ptr, "%w %w:%w %b %w %w %s\n",
|
||||
ptr += ksprintf(ptr, "%w %w:%w %b %w %w %w %s\n",
|
||||
task->pid(),
|
||||
task->uid(),
|
||||
task->gid(),
|
||||
task->state(),
|
||||
task->parentPID(),
|
||||
task->timesScheduled(),
|
||||
task->fileHandleCount(),
|
||||
task->name().characters());
|
||||
|
|
|
@ -64,6 +64,8 @@ public:
|
|||
uid_t uid() const { return m_uid; }
|
||||
uid_t gid() const { return m_gid; }
|
||||
|
||||
pid_t parentPID() const { return m_parentPID; }
|
||||
|
||||
const FarPtr& farPtr() const { return m_farPtr; }
|
||||
|
||||
FileHandle* fileHandleIfExists(int fd);
|
||||
|
|
Loading…
Add table
Reference in a new issue