Move setpgid into individual processes