Mail Archives: djgpp/1994/08/26/17:54:29
eliz AT is DOT elta DOT co DOT il (eliz AT is DOT elta DOT co DOT il) writes:
> > Speaking of which, I have seen very strange behaviour in a GO32
> > program, where open() succeeds and returns file descriptor 20, but
> > calling read() with this descriptor returns errno==EBADF!
>
> Do you have a short program which shows this behavior? Under what
> version of DJGPP this happens?
DJGPP 1.12. Unfortunately the program is not small, it is the
binutils-2.4 version of ld! In this case it is a cross-linker, rather
than DJGPP native, but I imagine that the same would happen with the
DJ linker. The bfd library maintains a cache of up to 10 open object
files. When go32 is using more than its normal number of open files
(i.e. it has emu387 and/or gdb mapped in), then the 10th open trips
over this limit (the first open under gdb does return 10). I solved
the problem by reducing bfd's open file cache limit.
_________________________________________________________________________
Nigel Stephens, Algorithmics Ltd, 3 Drayton Park, London, N5 1NU, England
phone: +44 71 700 3301 fax: +44 71 700 3400 email: nigel AT algor DOT co DOT uk
- Raw text -