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

TemporaryDirectory objects should LOCK_SH to avoid being deleted by systemd-tmpfiles #81831

Open
refi64 mannequin opened this issue Jul 22, 2019 · 1 comment
Open

TemporaryDirectory objects should LOCK_SH to avoid being deleted by systemd-tmpfiles #81831

refi64 mannequin opened this issue Jul 22, 2019 · 1 comment
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@refi64
Copy link
Mannequin

refi64 mannequin commented Jul 22, 2019

BPO 37650
Nosy @refi64
PRs
  • bpo-37650: tempfile: flock(LOCK_SH) on temporary directories #14908
  • 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 = None
    created_at = <Date 2019-07-22.12:10:54.060>
    labels = ['type-feature', 'library']
    title = 'TemporaryDirectory objects should LOCK_SH to avoid being deleted by systemd-tmpfiles'
    updated_at = <Date 2019-07-22.12:28:47.155>
    user = 'https://github.com/refi64'

    bugs.python.org fields:

    activity = <Date 2019-07-22.12:28:47.155>
    actor = 'python-dev'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2019-07-22.12:10:54.060>
    creator = 'refi64'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 37650
    keywords = ['patch']
    message_count = 1.0
    messages = ['348295']
    nosy_count = 1.0
    nosy_names = ['refi64']
    pr_nums = ['14908']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue37650'
    versions = []

    @refi64
    Copy link
    Mannequin Author

    refi64 mannequin commented Jul 22, 2019

    If e.g. a tar archive is extracted that has dates from several months ago, if systemd-tmpfiles runs to clean up data, then it may delete that data while the directory is still being used. This can be avoided by holding a LOCK_SH on the directory while it's being used.

    @refi64 refi64 mannequin added stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Jul 22, 2019
    @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
    stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    0 participants