Fix busted display of tty names in /proc/summary.

This commit is contained in:
Andreas Kling 2018-10-31 22:43:49 +01:00
parent a8f36f72a8
commit d980ddc745
Notes: sideshowbarker 2024-07-19 18:35:29 +09:00
4 changed files with 17 additions and 2 deletions

View file

@ -3,6 +3,7 @@
#include <VirtualFileSystem/VirtualFileSystem.h>
#include "system.h"
#include "MemoryManager.h"
#include "StdLib.h"
static ProcFileSystem* s_the;
@ -210,7 +211,7 @@ ByteBuffer procfs$summary()
task->parentPID(),
task->timesScheduled(),
task->fileHandleCount(),
task->tty() ? task->tty()->ttyName().characters() : "n/a",
task->tty() ? strrchr(task->tty()->ttyName().characters(), '/') + 1 : "n/a",
task->name().characters());
}
*ptr = '\0';