It has to be done explicitly here because the child processes that are spawned will keep the process alive otherwise. I could refactor that logic into a separate function that gets called here instead if you want, though.