When leave-stopped is enable, here should iterate through all the children files under each task to get all child processes. For example, for process 1, if it has two tasks: 1 and 2, and thread 2 forks a new process 3, then process 3 will appear in /proc/1/task/2/children, not in /proc/1/task/1/children.
https://github.com/xemul/criu-scripts/blob/fc80cf275a07c70ca459771f046d2c6882148b13/pstree_cont.py#L28C2-L28C17
When leave-stopped is enable, here should iterate through all the children files under each task to get all child processes. For example, for process 1, if it has two tasks: 1 and 2, and thread 2 forks a new process 3, then process 3 will appear in /proc/1/task/2/children, not in /proc/1/task/1/children.
https://github.com/xemul/criu-scripts/blob/fc80cf275a07c70ca459771f046d2c6882148b13/pstree_cont.py#L28C2-L28C17