lkml.org 
[lkml]   [1999]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: USB script
Date
In article <linux.kernel.19990429211200.B1253@uni-mainz.de>,
Dominik Kubla <dominik.kubla@uni-mainz.de> wrote:
>On Wed, Apr 28, 1999 at 10:29:59PM -0400, Albert D. Cahalan wrote:
>>
>> The file linux/drivers/usb/restart contains this line:
>> UPID=`ps aux | grep uhci-control | grep -v grep | awk '{print $2}'`
>>
>> That isn't such a great way to do it. I suggest this for now:
>> UPID=`ps auxc | grep '^root .* uhci-control$' | awk '{print $2}'`
>
>Even better:
>
>UPID=`ps -C uhci-control -o pid --no-headers`
>
>Of course that will only work with ps >=2.0.0. So we would have to
>require people to upgrade to at least this version...

A better idea might be to write a little utility that returns the
pid of the uhci-control program, so you can do

UPID=`pidof uhci-control`


(A public-domain pidof hack can be found at

http://www.pell.chi.il.us/~orc/Code/pidof.c

if you'd like.)

____
david parsons \bi/ I [heart] the proc filesystem.
\/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.077 / U:1.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site