`proc` is not a separate process in your example. It's just a function, run in the same process as the main shell.
The `$FUNCNAME` array gives it access to its backtrace:
foo(){ bar; }
bar(){ baz; }
baz(){ proc; }
proc(){ echo "${FUNCNAME[@]}"; }
$ foo
proc baz bar foo main
So yes, it can:
case ${FUNCNAME[1]} in runner) ...
If you experiment with it, you will see that running it in a subshell / subprocess doesn't break the backtrace or affect it in any way:
foo(){ (bar &) | cat; }
=> same output