accept process names
This commit is contained in:
parent
1dc6e083c1
commit
dd6c037b72
1 changed files with 12 additions and 1 deletions
13
bin/stack
13
bin/stack
|
|
@ -1,3 +1,14 @@
|
|||
#!/usr/local/plan9/bin/rc
|
||||
|
||||
echo '$c' | 9 db -q $*
|
||||
pid=$1
|
||||
shift
|
||||
if(! ~ $pid [0-9] [0-9]*[0-9] */core *.core core.* */core.*){
|
||||
name=$pid
|
||||
pid=`{psu|awk '$NF=="'$name'" {print $2}'}
|
||||
if(~ $#pid 0){
|
||||
echo 'stack: no process '$name
|
||||
exit none
|
||||
}
|
||||
}
|
||||
for(p in $pid)
|
||||
echo '$c' | 9 db -q $p $*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue