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

programs: ProgramFd is owned #744

Merged
merged 1 commit into from
Aug 14, 2023
Merged

programs: ProgramFd is owned #744

merged 1 commit into from
Aug 14, 2023

Commits on Aug 14, 2023

  1. programs: ProgramFd is owned

    `ProgramData::fd` is now a `ProgramFd`. This means that `ProgramData`
    now closes the file descriptor on drop. In the future we might consider
    making `ProgramFd` hold a `BorrowedFd` but this requires API design work
    due to overlapping borrows.
    
    Since `ProgramFd` is no longer `Copy`, update methods to take it by
    reference to allow callers to use it multiple times as they are
    accustomed to doing.
    
    `ProgramFd` is now returned by reference and implements `try_clone` to
    allow callers to avoid file descriptor cloning when desired.
    
    This is an API breaking change.
    
    Updates #612.
    tamird committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    504fd1d View commit details
    Browse the repository at this point in the history