Subprocess doesn't wait and makes PhantomJS crash
I finally found the reason my subprocess
kept crashing. Apparently, it's a bug in Python < 2.7.3, described here: http://bugs.python.org/issue12786
I had to use 'close_fds=True'
in my Popen
call and all was fixed. Thanks for your effort either way, @Mark Hildreth!