shithub: front

Download patch

ref: 740b766e5a9b0101225c23a5f9920d7d8b8fc67d
parent: 68c5bc7ad25fc33585846b5121a08f3e141a082d
author: Ori Bernstein <ori@eigenstate.org>
date: Sat Aug 16 17:53:39 EDT 2025

lstk: allow getting multiple stack traces

--- a/rc/bin/lstk
+++ b/rc/bin/lstk
@@ -1,10 +1,7 @@
 #!/bin/rc
 
-if(~ $#* 1)
-	p=$1
-if not if(~ $#* 0)
-	p=`{ps | grep Broken | awk '{print $2}' | sort -n | tail -n 1}
-if not
-	p 'usage: $0 [broken]' >[2=1]
-
-echo 'lstk()' | acid $p
+procs=$*
+if(~ $#* 0)
+	procs=`{ps | grep Broken | awk '{print $2}' | sort -n | tail -n 1}
+for(p in $procs)
+	echo 'lstk()' | acid $p
--