afm-run: handles pids and terminates groups