Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add signal.SIGSTKFLT constant (Linux) #89806

Closed
gareth-rees mannequin opened this issue Oct 28, 2021 · 4 comments
Closed

Add signal.SIGSTKFLT constant (Linux) #89806

gareth-rees mannequin opened this issue Oct 28, 2021 · 4 comments
Labels
3.11 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@gareth-rees
Copy link
Mannequin

gareth-rees mannequin commented Oct 28, 2021

BPO 45643
Nosy @vstinner, @gareth-rees, @thesamesam
PRs
  • bpo-45643: Add signal.SIGSTKFLT on platforms where this is defined. #29266
  • 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 2021-12-13.17:24:43.151>
    created_at = <Date 2021-10-28.10:31:03.862>
    labels = ['type-feature', 'library', '3.11']
    title = 'Add signal.SIGSTKFLT constant (Linux)'
    updated_at = <Date 2021-12-13.17:25:08.566>
    user = 'https://github.com/gareth-rees'

    bugs.python.org fields:

    activity = <Date 2021-12-13.17:25:08.566>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-12-13.17:24:43.151>
    closer = 'vstinner'
    components = ['Library (Lib)']
    creation = <Date 2021-10-28.10:31:03.862>
    creator = 'gdr@garethrees.org'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 45643
    keywords = ['patch']
    message_count = 4.0
    messages = ['405174', '406460', '408467', '408468']
    nosy_count = 3.0
    nosy_names = ['vstinner', 'gdr@garethrees.org', 'thesamesam']
    pr_nums = ['29266']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue45643'
    versions = ['Python 3.11']

    @gareth-rees
    Copy link
    Mannequin Author

    gareth-rees mannequin commented Oct 28, 2021

    BACKGROUND

    On Linux, "man 7 signal" includes SIGSTKFLT in its table of "various other signals":

    Signal     Value   Action  Comment
    ───────────────────────────────────────────────────────────────
    SIGSTKFLT  -,16,-   Term   Stack fault on coprocessor (unused)
    

    Here "-,16,-" means that the signal is defined with the value 16 on x86 and ARM but not on Alpha, SPARC or MIPS. I believe that the intention was to use SIGSTKFLT for stack faults on the x87 math coprocessor, but this was either removed or never implemented, so that the signal is defined in /usr/include/signal.h but not used by the Linux kernel.

    USE CASE

    SIGSTKFLT is one of a handful of signals that are not used by the kernel, so that user-space programs are free to use it for their own purposes, for example for inter-thread or inter-process pre-emptive communication.

    Accordingly, it would be nice if the name SIGSTKFLT were available in the Python signal module on the platforms where the signal is available, for use and reporting in these cases.

    @gareth-rees gareth-rees mannequin added 3.11 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Oct 28, 2021
    @gareth-rees
    Copy link
    Mannequin Author

    gareth-rees mannequin commented Nov 17, 2021

    Tagging vstinner as you have touched Modules/signalmodule.c a few times in the last year. What do you think?

    @vstinner
    Copy link
    Member

    New changeset a62be77 by Gareth Rees in branch 'main':
    bpo-45643: Add signal.SIGSTKFLT on platforms where this is defined (GH-29266)
    a62be77

    @vstinner vstinner changed the title SIGSTKFLT is missing from the signals module on Linux Add signal.SIGSTKFLT constant (Linux) Dec 13, 2021
    @vstinner vstinner changed the title SIGSTKFLT is missing from the signals module on Linux Add signal.SIGSTKFLT constant (Linux) Dec 13, 2021
    @vstinner
    Copy link
    Member

    I merged your PR, thanks!

    I'm curious how people use this signal :-)

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.11 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant