summaryrefslogtreecommitdiffstats
path: root/bin/backtrace
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-05-21 23:52:06 +0200
committertv <tv@shackspace.de>2015-05-21 23:52:06 +0200
commitf8b1e849a6a3bd53f24a4aac70bc904cdb5ff711 (patch)
tree826235e1b776665ab32ee787bb96cd3b6f519d95 /bin/backtrace
parentac764394050f6fc39e406799085259d3fc08956a (diff)
deploy: merge next
Diffstat (limited to 'bin/backtrace')
-rwxr-xr-xbin/backtrace32
1 files changed, 0 insertions, 32 deletions
diff --git a/bin/backtrace b/bin/backtrace
deleted file mode 100755
index 15d60a9b4..000000000
--- a/bin/backtrace
+++ /dev/null
@@ -1,32 +0,0 @@
-#! /bin/sh
-set -euf
-
-exec >&2
-
-pid=$$
-while :; do
- cd /proc/$pid
- cmdline=$(cat cmdline | tr '\0' ' ' | sed 's/ $//')
- ppid=$(grep PPid status | awk '{print$2}')
- printf '%5d %s\n' $pid "$cmdline"
- if [ $pid = 1 ]; then
- break
- else
- pid=$ppid
- fi
-done \
- | sed \
- "$(printf '
- s:\(/bin/sh \)%s/\([^ ]\+\):\e[32m\\2\e[m:g
- s:%s/\([^ ]\+\):\e[32;1m\\1\e[m:g
- ' \
- "$(dirname "$0" | bre-escape | sed 's/:/\\:/g')" \
- "$(dirname "$0" | bre-escape | sed 's/:/\\:/g')" \
- )" \
- | tac
-
-ps='Press ^C to abort: '
-while :; do
- printf '\e[K\e[31;1m%s\e[m' "$ps"
- read -r _input
-done