
___x_cmd_pidofsubshell_quick_(){
    if [ -n "$BASHPID" ]; then
        x_="$BASHPID"
        return
    fi

    if [ -n "$ZSH_VERSION" ]; then
        x_="${sysparams[pid]}"
        return
    fi

    x_=
}

___x_cmd_pidofsubshell(){
    local x_
    ___x_cmd_pidofsubshell_quick_
    if [ -z "$x_" ]; then   sh -c 'printf "%s\n" "$PPID"'
    else                    printf "%s\n" "$x_"
    fi
}

___x_cmd_pidofsubshell_(){
    ___x_cmd_pidofsubshell_quick_
    [ -n "$x_" ] || x_=$(sh -c 'printf "%s\n" "$PPID"')
}
