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

Linux signals during threads #40220

Closed
langmead mannequin opened this issue May 5, 2004 · 2 comments
Closed

Linux signals during threads #40220

langmead mannequin opened this issue May 5, 2004 · 2 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@langmead
Copy link
Mannequin

langmead mannequin commented May 5, 2004

BPO 948614
Files
  • linuxthreads.diffs: LinuxThreads signal handling changes.
  • 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 2004-05-26.14:51:59.000>
    created_at = <Date 2004-05-05.17:13:41.000>
    labels = ['interpreter-core']
    title = 'Linux signals during threads'
    updated_at = <Date 2004-05-26.14:51:59.000>
    user = 'https://bugs.python.org/langmead'

    bugs.python.org fields:

    activity = <Date 2004-05-26.14:51:59.000>
    actor = 'langmead'
    assignee = 'none'
    closed = True
    closed_date = None
    closer = None
    components = ['Interpreter Core']
    creation = <Date 2004-05-05.17:13:41.000>
    creator = 'langmead'
    dependencies = []
    files = ['5964']
    hgrepos = []
    issue_num = 948614
    keywords = ['patch']
    message_count = 2.0
    messages = ['45953', '45954']
    nosy_count = 1.0
    nosy_names = ['langmead']
    pr_nums = []
    priority = 'normal'
    resolution = 'out of date'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue948614'
    versions = ['Python 2.3']

    @langmead
    Copy link
    Mannequin Author

    langmead mannequin commented May 5, 2004

    The Linux implementation of pthreads in the 2.0 through 2.4
    (called LinuxThreads <http://pauillac.inria.fr/~xleroy/
    linuxthreads/>) has one notable place where it diverges
    from the pthreads standard. A signal caused by a thread will
    only trigger the signal handler on that thread, and it is not
    seen or able to be handled by any other thread. The
    LinuxThreads package was first created in 1996 and is only
    now starting to be replaced by the new Linux 2.6 threading
    facility (called NPTL.)

    The non-standard LinuxThreads behavior falls afoul with
    Python's thread semantics, since it assumes that only the
    main thread can set or act on signal handlers. For the
    pthreads environment, it enforces this by blocking signals on
    all threads except the main thread. On LinuxThreads, this
    causes these signals to become ignored and lost, sometimes
    causing deadlock.

    The enclosed patch tests for LinuxThread's specific
    peculiarities in the configure script and adjusts the handling
    of thread creation and signal handling in order to give
    threads the documented Python thread and signal behavior.

    @langmead langmead mannequin closed this as completed May 5, 2004
    @langmead langmead mannequin added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label May 5, 2004
    @langmead
    Copy link
    Mannequin Author

    langmead mannequin commented May 26, 2004

    Logged In: YES
    user_id=119306

    http://sourceforge.net/tracker/
    ?func=detail&aid=960406&group_id=5470&atid=305470 might be a
    better solution.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    interpreter-core (Objects, Python, Grammar, and Parser dirs)
    Projects
    None yet
    Development

    No branches or pull requests

    0 participants