-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Add #ifdef O_DSYNC
#15425
Comments
I could try to do this |
@jrasanen awesome! let us know if you need any pointers :) |
How would one write a test case for testing if O_DSYNC is being used? I made the changes and verified the code using strace, $ sudo strace -e trace=open -f ./node write_cats_to_tmp.js
[pid 9226] open("/vagrant/node/write_cats_to_tmp.js", O_RDONLY|O_CLOEXEC) = 12
Wrote to /tmp/cats.tmp
[pid 9232] open("/tmp/cats.tmp", O_WRONLY|O_CREAT|O_TRUNC|O_DSYNC|O_CLOEXEC, 0666) = 12
Writing to file
Wrote 9 bytes |
Since the flag has no directly observable effect, I think the best you can do is check that it's there when |
@bnoordhuis ok thanks! Which place you would recommend I add the test to? |
Yes, that's a good place for it. |
PR-URL: nodejs/node#15451 Fixes: nodejs/node#15425 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
PR-URL: nodejs#15451 Fixes: nodejs#15425 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
node_constants.cc
exportsO_SYNC
on Linux, butO_DSYNC
should probably be added.The text was updated successfully, but these errors were encountered: