blob: dace984f448dca6d734a1266511edd8d4103d43f [file] [log] [blame]
#!/bin/sh
# Trace the list of parent processes from here back to 'init'.
pid=$PPID
out=
while [ "$pid" -gt 0 ]; do
read ppid cmd <<-EOF
$(ps -o ppid= -o comm= $pid)
EOF
out=$cmd.$out
pid=$ppid
done
echo "${out%.}"