questions on kern.ps_showallthreads
Simon 'corecode' Schubert
corecode at fs.ei.tum.de
Sat Jul 17 09:16:05 PDT 2004
On 17.07.2004, at 13:42, Devon H. O'Dell wrote:
This probably isn't the most clean fix for this problem (it'd be nice
to put it in the comparison section of the for (;;) loop), but the
following diff should fix this problem.
--Devon
ÿþI n d e x : k e r n _ p r o c . c
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
R C S f i l e :
/ h o m e / p f 4 d f / p f 4 d f / s y s / k e r n /
k e r n _ p r o c . c , v
r e t r i e v i n g r e v i s i o n 1 . 1 . 1 . 1
d i f f - u - u - r 1 . 1 . 1 . 1 k e r n _ p r o c . c
- - - k e r n _ p r o c . c 1 5 J u l 2 0 0 4
1 9 : 5 0 : 1 1 - 0 0 0 0 1 . 1 . 1 . 1
+ + + k e r n _ p r o c . c 1 7 J u l 2 0 0 4
1 1 : 4 0 : 0 4 - 0 0 0 0
@ @ - 6 0 1 , 1 0 + 6 0 1 , 1 2 @ @
* c p u .
* /
o r i g c p u = m y c p u - > g d _ c p u i d ;
- f o r ( n = 1 ; p s _ s h o w a l l t h r e a d s & &
n < = n c p u s ; + + n ) {
+ f o r ( n = 1 ; n < = n c p u s ; + + n ) {
g l o b a l d a t a _ t r g d ;
i n t n i d ;
+ i f ( 0 = = p s _ s h o w a l l t h r e a d s & & 0
! = p - > p _ u c r e d - > c r _ u i d )
+ r e t u r n ( 0 ) ;
This might introduce unwanted visibility in jail()ed parts of the
system. Maybe
if (!ps_showallthreads || suser_proc(p))
would be a better solution. Untested, no warranty included.
cheers
simon
--
/"\
\ /
\ ASCII Ribbon Campaign
/ \ Against HTML Mail and News
Attachment:
PGP.sig
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00010.pgp
Type: application/octet-stream
Size: 186 bytes
Desc: "Description: This is a digitally signed message part"
URL: <http://lists.dragonflybsd.org/pipermail/kernel/attachments/20040717/c50ec8c4/attachment-0020.obj>
More information about the Kernel
mailing list