add return value for functions executed by child processes