Skip to content

File descriptor not closed in TimerFd #1379

Closed
@crdumoul

Description

@crdumoul

As specified in https://man7.org/linux/man-pages/man2/timerfd_create.2.html the file descriptor for a timerfd should be closed when it is no longer required. In nix::sys::timerfd::TimerFd there is no Drop implementation and the file descriptor is not automatically closed. This leads to a file descriptor leak.

The TimerFd struct either needs to properly own the file descriptor and close it when it's dropped, or make it explicit through documentation that the user of TimerFd needs to close the file descriptor themselves.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions