delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/11/20:15:17

Date: Mon, 11 Oct 1999 13:17:06 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: bub <bub AT null DOT videotron DOT ca>
cc: djgpp AT delorie DOT com
Subject: Re: Question regarding CGI
In-Reply-To: <38010A1D.BCF60B35@null.videotron.ca>
Message-ID: <Pine.SUN.3.91.991011131644.28578F-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sun, 10 Oct 1999, bub wrote:

> Today I decided to try to write a CGI application to use via
> Windows NT's Peer web service's web server. The code ( fairly
> simplistic, included below ). I get an error when I try to run
> it, claiming that the application didn't return the proper http
> headers, it then includes nothing as the error.
> I compiled the same code under Visual C++ on my work PC, and
> it runs fine... what gives ?

DJGPP programs look like ordinary DOS programs to Windows.  Therefore,
Windows runs a DJGPP program in a separate Virtual Machine, that is
different from the Virtual Machine where Windows programs run.
Redirecting standard streams (stdin, stdout, stderr) to a pipe from
another Virtual Machine requires some trickery, and many Windows Web
servers don't consider the case of a DOS CGI program, and don't employ
that trickery.  So the output from your program never gets to the
server.

Complain to the vendor of the server.  They should include a feature
that enables to redirect output from DOS CGI programs.  (Or maybe such
a feature is already described in their docs ;-).

> I couldn't find any references to CGI or problems related to it
> in the DJGPP FAQ.

It will be in the next release, I already have it in my working
draft.

- Raw text -


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