Date: Tue, 18 Nov 2003 17:36:04 +0100 (CET) From: Jilles Tjoelker <jilles@stack.nl> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/59423: [PATCH] ps: show 'sid' keyword in '-j' Message-ID: <20031118163604.7E91F1CC71@turtle.stack.nl> Resent-Message-ID: <200311181640.hAIGeHJq039058@freefall.freebsd.org>
index | next in thread | raw e-mail
>Number: 59423 >Category: bin >Synopsis: [PATCH] ps: show 'sid' keyword in '-j' >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Nov 18 08:40:17 PST 2003 >Closed-Date: >Last-Modified: >Originator: Jilles Tjoelker >Release: FreeBSD 5.1-CURRENT i386 >Organization: MCGV Stack >Environment: System: FreeBSD turtle.stack.nl 5.1-CURRENT FreeBSD 5.1-CURRENT #15: Thu Oct 9 11:43:55 CEST 2003 jilles@turtle.stack.nl:/usr/obj/usr/src/sys/TURTLE i386 FreeBSD 5-CURRENT >Description: Under FreeBSD 4.x, ps -j showed the keywords: user,pid,ppid,pgid,sess,jobc,state,tt,time,command Under FreeBSD 5.x, the sess keyword (session pointer) was abandoned, and (as a more useful replacement) the sid keyword (session id, PID of session leader) was introduced. However, the sess keyword was simply removed from ps -j instead of being replaced by sid. >How-To-Repeat: without patch $ ps -j -p $$ USER PID PPID PGID JOBC STAT TT TIME COMMAND jilles 52879 52843 52793 1 S+ p8 0:00.00 /usr/local/bin/bash with patch $ ps -j -p $$ USER PID PPID PGID SID JOBC STAT TT TIME COMMAND jilles 52879 52843 52793 5900 1 S+ p8 0:00.00 /usr/local/bin/bash >Fix: A patch is included to add the sid keyword to the list for '-j'. --- ps-j-sid.patch begins here --- --- /usr/src/bin/ps/ps.c Fri Jun 13 04:00:04 2003 +++ /usr/src/bin/ps/ps.c Fri Oct 10 17:50:46 2003 @@ -102,7 +102,7 @@ static uid_t *getuids(const char *, int *); static char dfmt[] = "pid,tt,state,time,command"; -static char jfmt[] = "user,pid,ppid,pgid,jobc,state,tt,time,command"; +static char jfmt[] = "user,pid,ppid,pgid,sid,jobc,state,tt,time,command"; static char lfmt[] = "uid,pid,ppid,cpu,pri,nice,vsz,rss,mwchan,state,tt,time,command"; static char o1[] = "pid"; static char o2[] = "tt,state,time,command"; --- /usr/src/bin/ps/ps.1.orig Tue Sep 9 04:00:05 2003 +++ /usr/src/bin/ps/ps.1 Tue Nov 18 16:26:23 2003 @@ -109,7 +109,7 @@ header per page of information. .It Fl j Print information associated with the following keywords: -user, pid, ppid, pgid, jobc, state, tt, time and command. +user, pid, ppid, pgid, sid, jobc, state, tt, time and command. .It Fl L List the set of available keywords. .It Fl l --- ps-j-sid.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031118163604.7E91F1CC71>
