...
Code Block | ||||
---|---|---|---|---|
| ||||
fd = open(ms, O_CREAT | O_EXCL | O_WRONLY | O_TRUNC); |
Note that, technicallyTechnically, it is incorrect to pass a third argument to open() when not creating a new file (that is, with the O_CREAT flag not set).
Compliant Solution (POSIX)
...