[issue42913] asyncio.ProactorEventLoop mishandles signal wakeup file descriptor

2021-07-28 Thread Guido van Rossum
Guido van Rossum added the comment: Have you investigated how that could be implemented and what the new API would look like? Personally I don't really like signals (they're not portable and code using them is super hard to get right) and I hesitate to add to their API. OTOH maybe you'll be

[issue42913] asyncio.ProactorEventLoop mishandles signal wakeup file descriptor

2021-07-28 Thread Michel Hidalgo
Michel Hidalgo added the comment: Circling back. I've been giving some thought to this. While this could be fixed within asyncio.proactor_events.ProactorEventLoop and asyncio.unix_events._UnixSelectorEventLoop implementations (e.g. calling signal.set_wakeup_fd once and forwarding signal

[issue42913] asyncio.ProactorEventLoop mishandles signal wakeup file descriptor

2021-01-18 Thread Guido van Rossum
Guido van Rossum added the comment: No pressure. If there's an API change needed you will have until 3.10 beta 1. Without API changes this can be fixed any time. -- ___ Python tracker

[issue42913] asyncio.ProactorEventLoop mishandles signal wakeup file descriptor

2021-01-18 Thread Michel Hidalgo
Michel Hidalgo added the comment: Sorry for taking so long to reply. Sure, I would be happy to contribute. We should probably take care of Unix event loops -- since I opened this ticket I found out those tend to not cooperate with other signal wakeup file descriptor users either. I am a

[issue42913] asyncio.ProactorEventLoop mishandles signal wakeup file descriptor

2021-01-12 Thread Guido van Rossum
Guido van Rossum added the comment: Looks this was not tested or thought through with multiple loops and signals (admittedly, using signals is never fun, and even less so on Windows). Can you send a PR with a fix? -- nosy: +gvanrossum ___ Python

[issue42913] asyncio.ProactorEventLoop mishandles signal wakeup file descriptor

2021-01-12 Thread Michel Hidalgo
New submission from Michel Hidalgo : asyncio.ProactorEventLoop uses a socket.socketpair and signal.set_wakeup_fd to wake up a loop that's polling I/O. However it does so with no consideration for file descriptors previously set (i.e. no signal number forwarding). Either by user code or by