Issue 33650: asyncio: Prohibit adding a signal handler for SIGCHLD (original) (raw)
Issue33650
This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
This issue has been migrated to GitHub: https://github.com/python/cpython/issues/77831
classification
Title: | asyncio: Prohibit adding a signal handler for SIGCHLD | ||
---|---|---|---|
Type: | Stage: | ||
Components: | asyncio | Versions: | Python 3.8 |
process
Status: | open | Resolution: | |
---|---|---|---|
Dependencies: | Superseder: | ||
Assigned To: | Nosy List: | asvetlov, gregory.p.smith, pitrou, yselivanov | |
Priority: | normal | Keywords: |
Created on 2018-05-25 20:56 by yselivanov, last changed 2022-04-11 14:59 by admin.
Messages (3) | ||
---|---|---|
msg317717 - (view) | Author: Yury Selivanov (yselivanov) * ![]() |
Date: 2018-05-25 20:56 |
Doing that will break subprocesses. | ||
msg318454 - (view) | Author: Yury Selivanov (yselivanov) * ![]() |
Date: 2018-06-01 19:00 |
To clarify this ticket: I'm talking about prohibiting `loop.add_signal_handler(SIGCHLD)` as it would break child processes watchers that asyncio installs. In other words, setting a custom SIGCHLD breaks asyncio internals. We can allow user-set SIGCHLD signals if we add some code to make sure that 'add_signal_handler(SIGCHLD)' delivers the signal to *both* asyncio internals and user code. But I'm not sure if there's a valid use case for listening for SIGCHLD for user code at all. For now, I disabled SIGCHLD in uvloop, let's see if people complain. | ||
msg318455 - (view) | Author: Antoine Pitrou (pitrou) * ![]() |
Date: 2018-06-01 19:41 |
Some people may have reasons to do that (for example: they write their own subprocess implementation). I suggest emitting a warning rather than forbidding it. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:59:00 | admin | set | github: 77831 |
2018-06-01 19:41:05 | pitrou | set | nosy: + pitroumessages: + |
2018-06-01 19:39:53 | pitrou | set | title: Prohibit adding a signal handler for SIGCHLD -> asyncio: Prohibit adding a signal handler for SIGCHLD |
2018-06-01 19:00:39 | yselivanov | set | messages: + |
2018-06-01 18:51:18 | ned.deily | set | nosy: + gregory.p.smith |
2018-05-25 20:56:35 | yselivanov | create |
Supported by The Python Software Foundation,
Powered by Roundup
Copyright © 1990-2022, Python Software Foundation
Legal Statements