Commit Diff


commit - 1dc6e083c15e1580b02d30aa349821fe98fcf989
commit + dd6c037b72b0988ed9d55fd89af30b10ca9999ea
blob - af649d55092f45e9edb913ae94d6940041b4f80a
blob + 933a6132b5229e8ad6aa9fe16b003beaf01e1e22
--- bin/stack
+++ 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 $*