aboutsummaryrefslogtreecommitdiff
path: root/bin/stack
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2008-07-10 11:05:34 -0400
committerRuss Cox <rsc@swtch.com>2008-07-10 11:05:34 -0400
commitfd652ac3195e155c8c0a4cb8ec104b029f40628e (patch)
tree20a3acca807272ab3dd6b993eef2a500b5813797 /bin/stack
parentc98946022a1d13840ac648fee0a0eaf58e3e34aa (diff)
downloadplan9port-fd652ac3195e155c8c0a4cb8ec104b029f40628e.tar.gz
plan9port-fd652ac3195e155c8c0a4cb8ec104b029f40628e.tar.bz2
plan9port-fd652ac3195e155c8c0a4cb8ec104b029f40628e.zip
stack: look in core by default
Diffstat (limited to 'bin/stack')
-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){