Anyone ever got this WR error dialog:
"Error (internal): bad mode passed to access system call."
It seemed to me that my AUT had a memory leak and almost everything on my computer ran out of memory (made a screenshot of the error dialog and the screenshot was only black&white).
But this error message is new to me, never had it before.
Did anyone else get this error before? Under which circumstances?
Jake, I couldn't reproduse the error.
During the time I was in the office, NO ONE was listening to B. Spears (at least not louder than 5 dB). But the error came up when running tests over the weekend, maybe someone with bad taste was doing some overtime? - I'll have to check this... [img]/images/graemlins/wink.gif[/img]
The access system call determines whether the calling process has access permission to a file. It can check any combination of read, write, and execute permission, and it can also check for a file's existence.
The access call takes two arguments. The first is the path to the file to check. The second is a bitwise or of R_OK, W_OK, and X_OK, corresponding to read, write, and execute permission. The return value is 0 if the process has all the specified permissions. If the file exists but the calling process does not have the specified permissions, access returns –1 and sets errno to EACCES (or EROFS, if write permission was requested for a file on a read-only file system).
If the second argument is F_OK, access simply checks for the file's existence. If the file exists, the return value is 0; if not, the return value is –1 and errno is set to ENOENT. Note that errno may instead be set to EACCES if a directory in the file path is inaccessible.
The program shown in Listing 8.1 uses access to check for a file's existence and to determine read and write permissions. Specify the name of the file to check on the command line.