Pass the shell process explicitly to functions which need it.