Skip to content

win: fail fs_open with append and file mapping#2448

Closed
joaocgreis wants to merge 1 commit intolibuv:v1.xfrom
JaneaSystems:joaocgreis-J92-fmap-append-eacces
Closed

win: fail fs_open with append and file mapping#2448
joaocgreis wants to merge 1 commit intolibuv:v1.xfrom
JaneaSystems:joaocgreis-J92-fmap-append-eacces

Conversation

@joaocgreis
Copy link
Copy Markdown
Contributor

@bnoordhuis suggested in nodejs/node#29260 (comment) that uv_fs_open should fail with EACCES when both O_APPEND and UV_FS_O_FILEMAP are specified. This is an implementation of that suggestion.

I would rather keep the current behavior and not land this PR, but don't have strong feelings.

  • With the current implementation, the behavior of uv_fs_read and uv_fs_write is exactly the same with or without UV_FS_O_FILEMAP. The code to support this is very small, and I suspect supporting this in Unix would also require little code - an unexpected but useful extension.
  • With this PR, uv_fs_open behaves more like what would be expected of a Unix implementation, by failing.

I'll leave the decision for the libuv maintainers.

@bnoordhuis
Copy link
Copy Markdown
Member

@libuv/collaborators This needs a decision.

@saghul
Copy link
Copy Markdown
Member

saghul commented Sep 6, 2019

I don't have a stong opinion, but the concept of "appending" to a memory mapped file feels linda awkward to me, so I'm +1 to landing this PR.

There is, however, some irony in that we are aligning the behavior with Unix but we don't support that flag there yet :-)

@stale
Copy link
Copy Markdown

stale Bot commented Dec 5, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the stale label Dec 5, 2019
@stale stale Bot closed this Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants