aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/stack7
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/stack b/bin/stack
index 933a6132..5744cef9 100755
--- a/bin/stack
+++ b/bin/stack
@@ -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){