The routine in question does some stuff that is very criu-specific. Separate these things apart so that seize_wait_task becomes generic enough. This includes threads' creds comparing and processes_to_wait calculations. -- Pavel