After reading and doing some tests to be sure, I have verified that the documentation of open (man 2 open) is not correct. - Make read only (O_RDONLY) don't give read and write mode (O_RDWR). - Using O_CREAT don't modify again the modes of the file after being created. - Omit the third parameter, the mode get any garbage is make for the file. - Write mode only work in the first time where the file is create, don't matter if the file are create in no write mode. I'm not sure how it should be fixed, or if any standard should be followed. Perhaps only the modification of the operating details in the documentation is needed.
The manual pages are not maintained by the glibc project. Please report issues with them to the linux-man mailing list: <https://www.kernel.org/doc/man-pages/linux-man-ml.html>