tstack: look in core by default - plan9port - [fork] Plan 9 from user space
git clone git://src.adamsgaard.dk/plan9port
Log
Files
Refs
README
LICENSE
---
commit fd652ac3195e155c8c0a4cb8ec104b029f40628e
parent c98946022a1d13840ac648fee0a0eaf58e3e34aa
Author: Russ Cox 
Date:   Thu, 10 Jul 2008 11:05:34 -0400

stack: look in core by default

Diffstat:
  M bin/stack                           |       7 +++++--

1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/bin/stack b/bin/stack
t@@ -1,8 +1,11 @@
 #!/usr/local/plan9/bin/rc
 
-pid=$1
+if(~ $#* 0)
+        pid=core
+if not
+        pid=$1
 shift
-if(! ~ $pid [0-9] [0-9]*[0-9] */core *.core core.* */core.*){
+if(! ~ $pid [0-9] [0-9]*[0-9] */core *.core core.* */core.* core){
         name=$pid
         pid=`{psu|awk '$NF=="'$name'" {print $2}'}
         if(~ $#pid 0){