I just noticed that you're using "." - this is different from executing the child process.  It sources the child script which may or may not be written as a shell script and thus may or may not work.  For example, if the target script is a python script, the dot (sourcing) won't work.

That's the idea of executing the script directly with either exec or direct shell invocation.