Summary: | sys-apps/portage: AsyncioEventLoop exception handler does not allow exit with Ctrl-C, SIGKILL required | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Zac Medico <zmedico> |
Component: | Core - Interface (emerge) | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | InVCS |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=678882 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 683434 |
Description
Zac Medico
2018-12-05 01:25:53 UTC
Maybe Scheduler should override the AsyncioEventLoop exception handler when it overrides the SIGINT/SIGTERM handlers. Maybe Scheduler could also use the asyncio loop.add_signal_handler API instead of using the signal module directly: https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.add_signal_handler The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=ee1f6ff69887dfa02d5c3a3ab3d61163fa504d15 commit ee1f6ff69887dfa02d5c3a3ab3d61163fa504d15 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2019-04-16 01:33:29 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2019-04-16 01:40:29 +0000 AsyncioEventLoop: enable SIGINT in exception handler (bug 672540) Before the exception handler invokes the pdb shell, enable SIGINT so that the user can exit with Control-C (otherwise SIGKILL is needed). Bug: https://bugs.gentoo.org/672540 Signed-off-by: Zac Medico <zmedico@gentoo.org> lib/portage/util/_eventloop/asyncio_event_loop.py | 5 +++++ 1 file changed, 5 insertions(+) (In reply to Zac Medico from comment #2) > Maybe Scheduler could also use the asyncio loop.add_signal_handler API > instead of using the signal module directly: > > https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop. > add_signal_handler This wouldn't be useful in the context of this bug since event loop signal handlers are useless when the loop is suspended (same problem as Scheduler's existing signal handler which relies on the event loop to ultimately trigger exit). |