Bring process_id out into its own method
Fix 1.8 failures with encoding