diff options
author | rsc <devnull@localhost> | 2006-06-26 00:02:19 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2006-06-26 00:02:19 +0000 |
commit | dd6c037b72b0988ed9d55fd89af30b10ca9999ea (patch) | |
tree | 4462c5940358efcbe102a5edd1b2f2cd061b9031 /bin | |
parent | 1dc6e083c15e1580b02d30aa349821fe98fcf989 (diff) | |
download | plan9port-dd6c037b72b0988ed9d55fd89af30b10ca9999ea.tar.gz plan9port-dd6c037b72b0988ed9d55fd89af30b10ca9999ea.tar.bz2 plan9port-dd6c037b72b0988ed9d55fd89af30b10ca9999ea.zip |
accept process names
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/stack | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -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 $* |