Zhang Weiwu <zhangwe...@realss.com> wrote:
> zhangwe...@mesopotamia:~$ ps ax | grep mule
> 13595 zhangwei 14080 R N  amuled
> 13598 zhangwei 14080 S N  amuled
> 13600 zhangwei 14080 S N  amuled
> 13603 zhangwei 14080 S N  amuled
> 13612 zhangwei  1352 S    grep mule
> zhangwe...@mesopotamia:~$ kill 13595

> Note that I should always kill the least-numbered process, I tried
> otherwise and always end up in trouble.

Er, no. To be pedantic and accurate, you should kill the process started
first. Given that PIDs wrap around from high numbers back to low numbers,
that doesn't always mean the lowest. (It might seem to be the lowest on
a relatively little used personal system that's rebooted daily, but you
cannot guarantee this expectation in all circumstances.)

Without knowing much about amuled, could you reliably use this? -

    kill $(ps ax | awk '$6=="amuled" && $4=="R" {print $1}')

Chris


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/lddbu7xs5i....@news.roaima.co.uk

Reply via email to