Expose the sigset_t converter via private API #77622
Copy link
Copy link
Closed
Labels
3.8 (EOL)end of lifeend of lifetype-featureA feature request or enhancementA feature request or enhancement
Description
| BPO | 33441 |
|---|---|
| Nosy | @pitrou, @serhiy-storchaka, @pablogsal |
| PRs |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = None
closed_at = <Date 2018-05-23.05:21:02.766>
created_at = <Date 2018-05-07.12:40:56.718>
labels = ['type-feature', '3.8']
title = 'Expose the sigset_t converter via private API'
updated_at = <Date 2018-05-23.05:21:02.765>
user = 'https://github.com/serhiy-storchaka'bugs.python.org fields:
activity = <Date 2018-05-23.05:21:02.765>
actor = 'serhiy.storchaka'
assignee = 'none'
closed = True
closed_date = <Date 2018-05-23.05:21:02.766>
closer = 'serhiy.storchaka'
components = []
creation = <Date 2018-05-07.12:40:56.718>
creator = 'serhiy.storchaka'
dependencies = []
files = []
hgrepos = []
issue_num = 33441
keywords = ['patch']
message_count = 3.0
messages = ['316267', '316278', '317358']
nosy_count = 3.0
nosy_names = ['pitrou', 'serhiy.storchaka', 'pablogsal']
pr_nums = ['6720']
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue33441'
versions = ['Python 3.8']Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
3.8 (EOL)end of lifeend of lifetype-featureA feature request or enhancementA feature request or enhancement
Activity
serhiy-storchaka commentedon May 7, 2018
posix_spawn() (see bpo-20104) needs the converter to sigset_t defined in signalmodule.c. Since the code is not trivial, it is better to share it instead of duplicate. The proposed PR:
Exposes the sigset_t converter via private API _Py_Sigset_Converter(). The implementation is moved to posixmodule.c.
Uses Argument Clinic for parsing sigset_t in signalmodule.c. In particularly it causes that the first argument of signal.sigtimedwait() will be parsed before the second one.
Make the converter always raising ValueError for signal numbers out of range 1..NSIG. OverflowError was raised before for integers out of the platform depending C long range.
serhiy-storchaka commentedon May 8, 2018
New changeset d54cfb1 by Serhiy Storchaka in branch 'master':
bpo-33441: Make the sigset_t converter available in other modules. (GH-6720)
d54cfb1
serhiy-storchaka commentedon May 23, 2018
Since posix_spawn() has been removed in 3.7, there is no need to backport this feature.