summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorPeter Elliott <pelliott@ualberta.ca>2021-10-10 15:26:39 -0600
committerAndreas Kling <kling@serenityos.org>2021-10-17 22:18:48 +0200
commit7283b0b2141222af43419acb0c1c0c22804a70f4 (patch)
treeaf203b892e3516f16a9b6bd05fa0bf155c3bb79e /Userland
parente3ed7f76c543bcaf915931d92b05355778e899c5 (diff)
downloadserenity-7283b0b2141222af43419acb0c1c0c22804a70f4.zip
Utilities: Show PGID and SID in ps -f
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Utilities/ps.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/Userland/Utilities/ps.cpp b/Userland/Utilities/ps.cpp
index b685ad59ac..524dfa15c2 100644
--- a/Userland/Utilities/ps.cpp
+++ b/Userland/Utilities/ps.cpp
@@ -63,6 +63,8 @@ int main(int argc, char** argv)
int uid_column = -1;
int pid_column = -1;
int ppid_column = -1;
+ int pgid_column = -1;
+ int sid_column = -1;
int state_column = -1;
int tty_column = -1;
int cmd_column = -1;
@@ -76,6 +78,8 @@ int main(int argc, char** argv)
uid_column = add_column("UID", Alignment::Left);
pid_column = add_column("PID", Alignment::Right);
ppid_column = add_column("PPID", Alignment::Right);
+ pgid_column = add_column("PGID", Alignment::Right);
+ sid_column = add_column("SID", Alignment::Right);
state_column = add_column("STATE", Alignment::Left);
tty_column = add_column("TTY", Alignment::Left);
cmd_column = add_column("CMD", Alignment::Left);
@@ -150,6 +154,10 @@ int main(int argc, char** argv)
row[pid_column] = String::number(process.pid);
if (ppid_column != -1)
row[ppid_column] = String::number(process.ppid);
+ if (pgid_column != -1)
+ row[pgid_column] = String::number(process.pgid);
+ if (sid_column != -1)
+ row[sid_column] = String::number(process.sid);
if (tty_column != -1)
row[tty_column] = tty;
if (state_column != -1)