Skip to content

Close/Unlock won't close the file descriptor if not locked #30

@virtuald

Description

@virtuald

Went and looked back at this, now I remember why I wanted an extra Close() function.

In try, anywhere after

var retried bool
, an error will leave the file open and the lock will be marked unlocked -- which means Unlock won't clear the file. A similar situation exists with the lock function as well, and the windows implementation suffers the same issue.

Perhaps the best solution would be to just close the file if the lock/try failed, then a user doesn't need to worry so much about a close function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions