Race to exit
Fix up an race condition where on Alpine linux waitpid() shows the process as still running when the stdout of the process has been closed.
Bug fix for accessing a nonexistent array key when attempting to load a source function that is not defined