Re: [PATCH 1/2] pids: fix cleanup of orphaned pids_task1 children

Li Wang <[email protected]>
Newsgroups gmane.linux.ltp
Message-ID <[email protected]>
> From: Andrea Cervesato <andrea.cervesato-IBi9RG/[email protected]>
> 
> pids_task1 forks a child that calls pause(), then the parent exits.
> The orphaned child remains in the cgroup but gets reparented to init,
> so it is not a child of the test shell.
> 
> stop_pids_tasks_path() reads cgroup.procs which includes this orphan.
> kill -9 succeeds but wait fails with 'not a child of this shell'.
> Using ROD for kill also unnecessarily aborts if the process is already
> dead.
> 
> Fix by suppressing errors from both kill and wait, and add killall
> for pids_task1 in cleanup() to catch any remaining orphans.
> 
> Signed-off-by: Andrea Cervesato <andrea.cervesato-IBi9RG/[email protected]>

Reviewed-by: Li Wang <[email protected]>

-- 
Regards,
Li Wang

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.