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

O_SYNC with O_APPEND flag in fs.open? #18635

Closed
bgnx opened this issue Feb 8, 2018 · 4 comments
Closed

O_SYNC with O_APPEND flag in fs.open? #18635

bgnx opened this issue Feb 8, 2018 · 4 comments
Labels
feature request Issues that request new features to be added to Node.js. fs Issues and PRs related to the fs subsystem / file system. good first issue Issues that are suitable for first-time contributors.

Comments

@bgnx
Copy link

bgnx commented Feb 8, 2018

fs.open can receive "rs+" flag and sets O_SYNC flag for cases when I need to know in callback that data has written to the hard drive (and not waiting in kernel cache) but is there a reason why there is no "as" or "as+" flag which sets the same O_SYNC flag but just for appending file (O_APPEND) ?

@bgnx bgnx changed the title O_SYNC with O_APPEND flag in fs.write? O_SYNC with O_APPEND flag in fs.open? Feb 8, 2018
@vsemozhetbyt vsemozhetbyt added question Issues that look for answers. fs Issues and PRs related to the fs subsystem / file system. labels Feb 8, 2018
@bnoordhuis bnoordhuis added good first issue Issues that are suitable for first-time contributors. feature request Issues that request new features to be added to Node.js. and removed question Issues that look for answers. labels Feb 15, 2018
@bnoordhuis
Copy link
Member

Probably an oversight. Pull requests welcome, the logic is in lib/internal/fs.js

@SirR4T
Copy link
Contributor

SirR4T commented Feb 15, 2018

Will take a shot at this.

@SirR4T
Copy link
Contributor

SirR4T commented Feb 15, 2018

@bgnx , @bnoordhuis : 'as' should have flags O_APPEND | O_CREAT | O_WRONLY | O_SYNC, and 'as+' should have flags O_APPEND | O_CREAT | O_RDWR | O_SYNC. Is this understanding correct?

@ryzokuken
Copy link
Contributor

Please close this as appropriate commits have been merged.

@cjihrig cjihrig closed this as completed Mar 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issues that request new features to be added to Node.js. fs Issues and PRs related to the fs subsystem / file system. good first issue Issues that are suitable for first-time contributors.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants