diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2024-10-10 10:24:15 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2024-10-10 10:24:15 +0000 |
commit | bcd3ca299928423cccafb95891ec2c87c594806b (patch) | |
tree | 8593ccc3222cb1a56393618028f1bff1c854e159 /bin/ps | |
parent | ad8c2676bf791cb881b4d30821ea259b995a6c80 (diff) |
Print the session id (PID of the session leader) instead of a pointer.
Pointers are only visible when run as superuser. Also in most cases
you want to know which process is the session leader and which process
groups belong together. So it is better to print the session id.
OK deraadt@ (long time ago)
Diffstat (limited to 'bin/ps')
-rw-r--r-- | bin/ps/keyword.c | 4 | ||||
-rw-r--r-- | bin/ps/ps.1 | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/bin/ps/keyword.c b/bin/ps/keyword.c index 4ec98733594..8b4fd01929e 100644 --- a/bin/ps/keyword.c +++ b/bin/ps/keyword.c @@ -1,4 +1,4 @@ -/* $OpenBSD: keyword.c,v 1.52 2022/02/25 18:05:49 rob Exp $ */ +/* $OpenBSD: keyword.c,v 1.53 2024/10/10 10:24:14 claudio Exp $ */ /* $NetBSD: keyword.c,v 1.12.6.1 1996/05/30 21:25:13 cgd Exp $ */ /*- @@ -158,7 +158,7 @@ VAR var[] = { {"rtable", "RTABLE", NULL, 0, pvar, 0, 0, POFF(p_rtableid), INT32, "d"}, UID("ruid", "RUID", pvar, POFF(p_ruid)), {"ruser", "RUSER", NULL, LJUST, runame, USERLEN}, - {"sess", "SESS", NULL, 0, pvar, PTRWIDTH, 0, POFF(p_sess), UINT64, "llx"}, + PID("sess", "SESS", pvar, POFF(p_sid)), {"sig", "PENDING", NULL, 0, pvar, 8, 0, POFF(p_siglist), INT32, "x"}, {"sigcatch", "CAUGHT", NULL, 0, pvar, 8, 0, POFF(p_sigcatch), UINT32, "x"}, {"sigignore", "IGNORED", diff --git a/bin/ps/ps.1 b/bin/ps/ps.1 index 4452bdcc418..2ea4db84e1b 100644 --- a/bin/ps/ps.1 +++ b/bin/ps/ps.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ps.1,v 1.137 2024/08/21 03:07:45 deraadt Exp $ +.\" $OpenBSD: ps.1,v 1.138 2024/10/10 10:24:14 claudio Exp $ .\" $NetBSD: ps.1,v 1.16 1996/03/21 01:36:28 jtc Exp $ .\" .\" Copyright (c) 1980, 1990, 1991, 1993, 1994 @@ -30,7 +30,7 @@ .\" .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" -.Dd $Mdocdate: August 21 2024 $ +.Dd $Mdocdate: October 10 2024 $ .Dt PS 1 .Os .Sh NAME @@ -382,7 +382,7 @@ Real user ID. User name (from .Cm ruid ) . .It Cm sess -Session pointer. +Session ID (PID of session leader). .It Cm sig Alias: .Cm pending . |