Track the PID of the leaf R process in the app worker for easier process management.