Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Apr 2001 15:24:20 -0700
From:      Dima Dorfman <dima@unixfreak.org>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        John Baldwin <jhb@FreeBSD.org>, Kirk McKusick <mckusick@mckusick.com>, cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, Brian Somers <brian@Awfulhak.org>
Subject:   Re: cvs commit: src/bin/ps ps.c 
Message-ID:  <20010411222421.39B3C3E09@bazooka.unixfreak.org>
In-Reply-To: <Pine.BSF.4.21.0104112151320.95695-100000@besplex.bde.org>; from bde@zeta.org.au on "Wed, 11 Apr 2001 21:59:03 %2B1000 (EST)"

next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans <bde@zeta.org.au> writes:
> On Tue, 10 Apr 2001, John Baldwin wrote:
> 
> > [ more to Brian than to Kirk ]
> > If all that is needed is a uniquifier for sessions, then why not use
> > the actual session ID itself: s_sid?  It's already provided in
> > kinfo_proc as ki_sid even, ps(1) just doesn't use it at the moment.
> > That is probably much easier to parse than a kernel address.
> 
> I agree that this would be better.  In fact, Kirk added both ki_sid and
> ki_tsid.  He apparently just forgot to actually use them :-).

Then we're all in agreement.  Now all we need is a patch.  See attached. :-)

					Dima Dorfman
					dima@unixfreak.org


Index: keyword.c
===================================================================
RCS file: /st/src/FreeBSD/src/bin/ps/keyword.c,v
retrieving revision 1.29
diff -u -r1.29 keyword.c
--- keyword.c	2001/02/14 18:54:34	1.29
+++ keyword.c	2001/04/11 22:22:47
@@ -148,6 +148,8 @@
 	{"ruid", "RUID", NULL, 0, kvar, NULL, UIDLEN, KOFF(ki_ruid),
 		UINT, UIDFMT},
 	{"ruser", "RUSER", NULL, LJUST|DSIZ, runame, s_runame, USERLEN},
+	{"sid", "SID", NULL, 0, kvar, NULL, PIDLEN, KOFF(ki_sid), UINT,
+		PIDFMT},
 	{"sig", "PENDING", NULL, 0, kvar, NULL, 8, KOFF(ki_siglist), INT, "x"},
 	{"sigcatch", "CAUGHT",
 		NULL, 0, kvar, NULL, 8, KOFF(ki_sigcatch), UINT, "x"},
@@ -167,6 +169,8 @@
 	{"time", "TIME", NULL, USER, cputime, NULL, 9},
 	{"tpgid", "TPGID",
 		NULL, 0, kvar, NULL, 4, KOFF(ki_tpgid), UINT, PIDFMT},
+	{"tsid", "TSID", NULL, 0, kvar, NULL, PIDLEN, KOFF(ki_tsid), UINT,
+		PIDFMT},
 	{"tsiz", "TSIZ", NULL, 0, tsize, NULL, 4},
 	{"tt", "TT ", NULL, 0, tname, NULL, 4},
 	{"tty", "TTY", NULL, LJUST, longtname, NULL, 8},
Index: ps.1
===================================================================
RCS file: /st/src/FreeBSD/src/bin/ps/ps.1,v
retrieving revision 1.32
diff -u -r1.32 ps.1
--- ps.1	2001/04/07 11:22:26	1.32
+++ ps.1	2001/04/11 22:22:47
@@ -430,6 +430,8 @@
 .Tn ID
 .It ruser
 user name (from ruid)
+.It sid
+session ID
 .It sig
 pending signals (alias pending)
 .It sigcatch
@@ -457,6 +459,8 @@
 .Tn ID
 .\".It trss
 .\"text resident set size (in Kbytes)
+.It tsid
+control terminal session ID
 .It tsiz
 text size (in Kbytes)
 .It tt

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010411222421.39B3C3E09>