<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 25, 2022 at 7:44 PM Richard Palethorpe <<a href="mailto:rpalethorpe@suse.de" target="_blank">rpalethorpe@suse.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Luke Nowakowski-Krijger <<a href="mailto:luke.nowakowskikrijger@canonical.com" target="_blank">luke.nowakowskikrijger@canonical.com</a>> writes:<br>
<br>
> +setup()<br>
> +{<br>
> + common_setup<br>
<br>
This can fail and we have not set pid yet.<br>
<br>
> + cgroup_fj_proc&<br>
> + pid=$!<br>
> + create_subgroup "$start_path/ltp_1"<br>
> +}<br>
> <br>
> -ROD kill -9 $pid<br>
> -wait $pid<br>
> -ROD rmdir "$start_path/ltp_1"<br>
> +cleanup()<br>
> +{<br>
> + kill -9 $pid >/dev/null 2>&1<br>
> + wait $pid >/dev/null 2>&1<br>
<br>
$pid is unset so this just waits forever. We need something like the<br>
following:<br>
<br>
if [ -n "$pid" ]; then<br>
kill -9 $pid >/dev/null 2>&1<br>
wait $pid >/dev/null 2>&1<br>
fi<br>
<br></blockquote><div><br></div><div class="gmail_default" style="font-size:small">+1 Someone who merges patch can help fix this.</div></div><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>