fs: define `rs` flag as `O_RDONLY`, not `O_RDONLY` | `O_SYNC`
O_SYNC
means "Write operations on the file will complete according to the requirements of synchronized I/O file integrity completion"(ref).
So, setting O_RDONLY
and O_SYNC
at the same time is inconsistent.
According to the following test, rs
has the same result as r
.
https://github.com/nodejs/node/blob/2a4452a53af65a13db4efae474162a7dcfd38dd5/deps/uv/test/test-fs-open-flags.c#L276-L294
Also, rs
is not in document https://nodejs.org/api/fs.html#file-system-flags .