Mail Archives: djgpp/1996/05/23/10:05:51
>>>>> "EZ" == Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> writes:
me> I'm using DJGPP2 with the `heapfix' patched CWSDPMI DPMI server.
me> From time to time, I get a failed `read' and errno of EACCES.
EZ> Please tell more about this, it's very hard to help you based on
EZ> the info you provided. Why do you think the `heapfix' patch is
EZ> relevant?
Just avoiding the "go get it" dance...
EZ> Can you post a small test program that exhibits the errors? Did you try
EZ> to see whether your disk drive is failing sometimes?
Now I can describe the problem with precision:
If there is a pre-existing file, which you then try to overwrite
using `creat', the first read from the file will return a -1 with
errno==EACCESS, instead of a zero-length read.
The two workarounds are:
1) Wrap `read' with another function that checks for the -1/EACCES
combination.
1) Delete the file before you recreate it.
Thanks!
- Raw text -