Skip to content

wanted: open(create=true, exclusive=true) dead or alive #33947

Open
@vtjnash

Description

@vtjnash

Sometimes useful, for creating atomic lockfiles (https://github.com/vtjnash/Pidfile.jl) or secure tempfiles:

`JL_O_EXCL` if this is a concern. Using [`mktemp()`](@ref) is also

The exclusive=true flag (only valid in combination with create=true) should simply map the the underlying O_EXCL option to open (this exists everywhere that Julia runs).

(could also try to add O_NOFOLLOW, though FILE_FLAG_OPEN_REPARSE_POINT is more like O_SYMLINK, and so is hard to implement everywhere. And there's a couple others like RANDOM, SEQUENTIAL, SYNC, DSYNC, NOATIME, DIRECT, and SHORT_LIVED that could even be filtered out when not supported.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureIndicates new feature / enhancement requestsgood first issueIndicates a good issue for first-time contributors to Julia

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions