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

Need pthread_atfork-like functionality in CPython #51172

Closed
Yhg1s opened this issue Sep 16, 2009 · 2 comments
Closed

Need pthread_atfork-like functionality in CPython #51172

Yhg1s opened this issue Sep 16, 2009 · 2 comments
Assignees
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement

Comments

@Yhg1s
Copy link
Member

Yhg1s commented Sep 16, 2009

BPO 6923
Nosy @Yhg1s, @gpshead, @jcea
Superseder
  • bpo-16500: Allow registering at-fork handlers
  • 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 = 'https://github.com/Yhg1s'
    closed_at = <Date 2013-08-21.18:44:31.642>
    created_at = <Date 2009-09-16.20:03:12.259>
    labels = ['interpreter-core', 'type-feature']
    title = 'Need pthread_atfork-like functionality in CPython'
    updated_at = <Date 2013-08-21.18:44:31.641>
    user = 'https://github.com/Yhg1s'

    bugs.python.org fields:

    activity = <Date 2013-08-21.18:44:31.641>
    actor = 'neologix'
    assignee = 'twouters'
    closed = True
    closed_date = <Date 2013-08-21.18:44:31.642>
    closer = 'neologix'
    components = ['Interpreter Core']
    creation = <Date 2009-09-16.20:03:12.259>
    creator = 'twouters'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 6923
    keywords = []
    message_count = 2.0
    messages = ['92715', '92765']
    nosy_count = 3.0
    nosy_names = ['twouters', 'gregory.p.smith', 'jcea']
    pr_nums = []
    priority = 'low'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '16500'
    type = 'enhancement'
    url = 'https://bugs.python.org/issue6923'
    versions = []

    @Yhg1s
    Copy link
    Member Author

    Yhg1s commented Sep 16, 2009

    In order to properly handle multiple threads and fork()-calls from C code
    (rather than os.fork()), Python should provide pthread_atfork()-like
    functionality: a function to call before a fork, to acquire any locks
    that need to be acquired, and a pair of functions to call after the fork,
    in the parent and the child, to release or re-allocate locks. The
    acquisitions should be re-entrant and should not require an existing
    threadstate. Also see <http://bugs.python.org/issue1590864\>.

    @Yhg1s Yhg1s self-assigned this Sep 16, 2009
    @Yhg1s Yhg1s added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement labels Sep 16, 2009
    @gpshead
    Copy link
    Member

    gpshead commented Sep 17, 2009

    For reference, this is related to http://bugs.python.org/issue6721 but
    deals with the C API side of things for an atfork mechanism to be used by
    extension modules.

    @neologix neologix mannequin closed this as completed Aug 21, 2013
    @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
    interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants