[processing] Avoid python hangs when run in headless mode from FCGI