The return value of an open() was -1 and on trying to find the error using perror() the output was "File exists".
How do I find the error or the reason for the file not opening.
The return value of an open() was -1 and on trying to find the error using perror() the output was "File exists".
How do I find the error or the reason for the file not opening.
Looks like
You probably would have given the macro with the quotes as described below:
It should be
fd = open(filename,O_RDONLY);
without quotes.