How do you start your processes? If they are started in the background, then the child could return without waiting for the process to complete. Also, if your process terminated before creating the file to publich, then, of course, there would be nothing to publish.