On Mon, Jul 22, 2024 at 09:40:48PM GMT, Zac Medico wrote:
> Fix _EbuildFetcherProcess to handle SIGTERM, so that FETCHCOMMAND
> processes will not be left running in the background:
> 
> * Convert the fetch function to an async_fetch coroutine function
>   so that it can use asyncio.CancelledError handlers to terminate
>   running processes.
> 
> * Use multiprocessing.active_children() to detect and terminate
>   any processes that asyncio.CancelledError handlers did not have
>   an opportunity to terminate because the exception arrived too
>   soon after fork/spawn.
> 
> * Add unit test to verify that a child process is correctly
>   killed when EbuildFetcher is cancelled, with short timeout in
>   case it takes some time for the process to disappear.
> 
> Bug: https://bugs.gentoo.org/936273
> Closes: https://github.com/gentoo/portage/pull/1361
> Signed-off-by: Zac Medico <zmed...@gentoo.org>

Looks good.

Reviewed-by: Joey Pabalinas <joeypabali...@gmail.com>

-- 
Cheers,
Joey Pabalinas

Attachment: signature.asc
Description: PGP signature

Reply via email to