summaryrefslogtreecommitdiff
path: root/Kernel/ProcFileSystem.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-10-30 15:33:37 +0100
committerAndreas Kling <awesomekling@gmail.com>2018-10-30 15:33:37 +0100
commit7a7956a59526e21262675e7647a89c865d93d551 (patch)
treed906ffe5fe57904e1a78ed4b8965dfd85e2b9f16 /Kernel/ProcFileSystem.cpp
parent68739dc43e6bc42f9cac79fe5cbec714ddeeb218 (diff)
downloadserenity-7a7956a59526e21262675e7647a89c865d93d551.zip
Virtual consoles kinda work!
We now make three VirtualConsoles at boot: tty0, tty1, and tty2. We launch an instance of /bin/sh in each one. You switch between them with Alt+1/2/3 How very very cool :^)
Diffstat (limited to 'Kernel/ProcFileSystem.cpp')
-rw-r--r--Kernel/ProcFileSystem.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Kernel/ProcFileSystem.cpp b/Kernel/ProcFileSystem.cpp
index e56320df2c..ff8495a723 100644
--- a/Kernel/ProcFileSystem.cpp
+++ b/Kernel/ProcFileSystem.cpp
@@ -201,15 +201,16 @@ ByteBuffer procfs$summary()
auto tasks = Task::allTasks();
auto buffer = ByteBuffer::createUninitialized(tasks.size() * 256);
char* ptr = (char*)buffer.pointer();
- ptr += ksprintf(ptr, "PID OWNER STATE PPID NSCHED FDS NAME\n");
+ ptr += ksprintf(ptr, "PID OWNER STATE PPID NSCHED FDS TTY NAME\n");
for (auto* task : tasks) {
- ptr += ksprintf(ptr, "% 5u % 4u % 8s % 5u % 10u % 3u %s\n",
+ ptr += ksprintf(ptr, "% 5u % 4u % 8s % 5u % 10u % 3u % 4s %s\n",
task->pid(),
task->uid(),
toString(task->state()),
task->parentPID(),
task->timesScheduled(),
task->fileHandleCount(),
+ task->tty() ? task->tty()->ttyName().characters() : "n/a",
task->name().characters());
}
*ptr = '\0';