Re: the difeirent bettwen the function open() with two an three parameters




freegnu wrote:
hi all, i dont dont whats the difference, and the different bettwen flags
and mode

The third parameter in open is to give mode while we create a file
using open system call, where flag 'll be O_CREAT and we can specify
the user access permissions using mode.
ex: open(char filename, O_CREAT, S_IRUSER);

If the file is already there, no need of third parameter.

flag is to give type of access of file and mode to specify who can
access the files.

.



Relevant Pages