www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/01/01/03:25:55

Date: Mon, 1 Jan 2001 10:18:30 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Jean Michel <jmichel AT schur DOT institut DOT math DOT jussieu DOT fr>
cc: djgpp AT delorie DOT com
Subject: Re: Bug in djgpp libc
In-Reply-To: <92o411$em$1@schur.institut.math.jussieu.fr>
Message-ID: <Pine.SUN.3.91.1010101101339.3587Z-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019