I am running a long process (actually another python script) in the background. I need to know when it has finished. I have found that Popen.poll() always returns 0
Popen.poll()
You shouldn't run your script with ampersand at the end. Because shell forks your process and returns 0 exit code.