Mail Archives: djgpp/2001/01/01/03:25:55
On 31 Dec 2000, Jean Michel wrote:
> Hello, there is a bug in the djgpp libc library.
It's not a bug in DJGPP.
> { printf("\032\n");
> fprintf(stderr, "%s\n", strerror(errno));
> }
>
> produces
>
> No space left on drive (ENOSPC)
That's because the DOS/Windows console driver returns EOF when you write
the Ctrl-Z character to it in cooked mode. Ctrl-Z is a kind of
``software end-of-file'' marker in DOS. There's nothing DJGPP can do with
that.
> [For people who may wonder why one would want to do the above, this is
> the end result of trying to find the smallest example which shows a bug
> occuring in the djgpp port of the ruby interpreter]
A program which really _needs_ to write a raw Ctrl-Z character to the
screen, should switch the console device into raw mode, where the special
meaning of characters such as Ctrl-Z, Ctrl-P, TAB, etc. is switched off.
However, since this issue is tricky, I'd suggest to post here an
explanation of why does the ruby interpreter need to write a Ctrl-Z
character to the screen. It's quite possible that switching the console
into raw mode is not the right thing to do in that case, but it's hard to
suggest a good solution without knowing the details.
- Raw text -