mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 08:35:09 +00:00
Add tcsetpgrp()+tcgetpgrp().
One more step on the path to being able to ^C a runaway process. :^)
This commit is contained in:
parent
d8f0dd6f3b
commit
621217ffeb
11 changed files with 72 additions and 4 deletions
|
@ -277,10 +277,11 @@ ByteBuffer procfs$summary()
|
|||
auto processes = Process::allProcesses();
|
||||
auto buffer = ByteBuffer::createUninitialized(processes.size() * 256);
|
||||
char* ptr = (char*)buffer.pointer();
|
||||
ptr += ksprintf(ptr, "PID PGP SID OWNER STATE PPID NSCHED FDS TTY NAME\n");
|
||||
ptr += ksprintf(ptr, "PID TPG PGP SID OWNER STATE PPID NSCHED FDS TTY NAME\n");
|
||||
for (auto* process : processes) {
|
||||
ptr += ksprintf(ptr, "% 3u % 3u % 3u % 4u % 8s % 3u % 9u % 3u % 4s %s\n",
|
||||
ptr += ksprintf(ptr, "% 3u % 3u % 3u % 3u % 4u % 8s % 3u % 9u % 3u % 4s %s\n",
|
||||
process->pid(),
|
||||
process->tty() ? process->tty()->pgid() : 0,
|
||||
process->pgid(),
|
||||
process->sid(),
|
||||
process->uid(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue