delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/01/07/02:06:30

Date: Thu, 7 Jan 1999 09:06:41 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: David Arnold <darnold AT northcoast DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: RHIDE exits program without asking for input
In-Reply-To: <36944202.4CA9A0F3@northcoast.com>
Message-ID: <Pine.SUN.3.91.990107090051.16723I@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On Wed, 6 Jan 1999, David Arnold wrote:

> When I run it from within RHIDE 1.4.7, it works fine: A DOS box opens, I
> enter some characters, hit Return, and the characters are echoed. Now,
> I'm not sure what the EOF character should be, but I am thinking Ctrl+Z.
> This works and I am back in the RHIDE editor. But, when I try to run
> again with Ctrl+9, the program exits with: Program exit code; 0
> (0x0000), before I get any chance to put in any input. No DOS box opens,
> nada.

Let me guess: if you run your program from the DOS prompt, it works 
correctly, no matter how many times do you invoke it.  Right?

If so, this has something to do with reading console input from programs
run from within RHIDE.  The Ctrl-Z key (or the EOF indication it causes)
is not cleared, so the second invocation exits immediately. 

This problem pops up so rarely that it wasn't possible to debug it, 
AFAIK.  I also don't think it is really necessary, since it's not your 
program's fault anyway.

> What should I do to get the expected behavior?

Run the program outside RHIDE, I'd say.

- Raw text -


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