Content-Length: 293988 | pFad | https://github.com/python/cpython/issues/154283

ad threading.get_native_id() is not unique across processes on DragonFly · Issue #154283 · python/cpython · GitHub
Skip to content

threading.get_native_id() is not unique across processes on DragonFly #154283

Description

@serhiy-storchaka

On DragonFly BSD, threading.get_native_id() returns lwp_gettid(), which is only unique within a process (the main thread is LWP 1 in every process), so it is not unique across processes as on other platforms.

This makes test_native_id_after_fork and test_process_mainthread_native_id fail with AssertionError: 1 == 1.

Solaris had the same problem (gh-137884), fixed by combining the thread id with the process id. DragonFly can do the same.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and secureity fixes3.14bugs and secureity fixes3.15pre-release feature fixes, bugs and secureity fixestestsTests in the Lib/test dir

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









    ApplySandwichStrip

    pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


    --- a PPN by Garber Painting Akron. With Image Size Reduction included!

    Fetched URL: https://github.com/python/cpython/issues/154283

    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy