...
Compliant Code Solution 1
The third argument to open
should be present to specify the access permissions for the newly created file should be specified in the call to open()
.
Code Block |
---|
... int fd = open(file_name, O_CREAT | O_WRONLY, file_mode); if (fd == -1){ /* Handle Error */ } ... |
...