Date: Wed, 17 May 2000 10:21:20 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: AndrewJ <luminous-is AT home DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Interpreter for Perl, etc...
In-Reply-To: <6kiU4.54117$55.1104022@news2.rdc1.on.home.com>
Message-ID: <Pine.SUN.3.91.1000517102103.4709H-100000@is>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
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
Precedence: bulk


On Tue, 16 May 2000, AndrewJ wrote:

> > The solution to this is to wrap Perl with a batch file.  Then
> > redirection works as you'd expect.
> 
> Or you could use redir, correct?

No, this won't help.

The problem with CGIs compiled with DJGPP is that the Web server is a
Windows program.  Windows programs run in the System VM, while DJGPP
programs run in their own VM.  The Web server needs to redirect the
standard streams of the CGI program, in order to give it input and
catch its output, but redirecting I/O between separate VMs is tricky.
Wrapping the DJGPP program with a batch file seems to solve this
problem (evidently, Web servers know how to redirect I/O of
COMMAND.COM).