Worker now writes PIDs to disk for later killing. Patch by Simone Manini.