delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/08/01/19:54:41

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <1091403595.410d7f4b3a5ab@webmail.bates.edu>
Date: Sun, 1 Aug 2004 19:39:55 -0400
From: jhart AT bates DOT edu
To: cygwin AT cygwin DOT com
Subject: 1.5.10: Apache, CGIs giving "User defined signal 2" or silent failure
MIME-Version: 1.0
User-Agent: Internet Messaging Program (IMP) 3.2.1
X-Originating-IP: 216.195.156.96
X-IsSubscribed: yes

I'm running Cygwin 1.5.10 on Windows XP Pro, Apache 1.3.29 (Cygwin), gawk 3.1.3
included with Cygwin, and curl 7.11.1 (i686-pc-cygwin). I wrote a simple CGI in
gawk:

#!/bin/gawk -f
BEGIN {
        print "Content-type: text/plain\n"
        cmd = "curl -s http://www.bates.edu/ils"
        #cmd = "awk 'BEGIN{print "Hello World"}'"
        #cmd = "ls -l"

        while(( cmd|getline )>0) print $0
}

If run from the command line, this works fine. If called from a web browser, the
result is empty and the httpd error_log often says:

[notice] child pid 2408 exit signal User defined signal 2 (31)

Sometimes there is no message in the log.

If I commment the first line that starts with "cmd =" and uncomment the 3rd one,
the CGI will run and list the directory to the browser window. If I comment the
3rd one and uncomment the second, it fails.

I also tried using Gawk's networking code to fetch the web page, instead of
spawning the 'curl' command to see if creating a subprocess is at fault. Again,
the program works from the command line, but fails as a CGI. This time, the
error message is:

  fatal: can't open two way socket...

Which tells us that the open failed, but not why.

A similar sounding problem was reported in 2001 by Henry S. Thompson:

http://sources.redhat.com/ml/cygwin/2001-01/msg00089.html

I am trying to use Cygwin to run our web database project, which was written for
Apache and Unix, under Windows. We haven't the resources to write and maintain a
separate version for Windows. So, running Apache and our CGIs and Sablotron
under Cygwin is our only hope for being able to offer our system to
Windows-based partners. The Unix version of the project can be viewed at
www.watermarkarchive.org/fmxml/mainmenu.xfm


Jim Hart, Project Manager
Academic Technology Support
Information and Library Services
Bates College







--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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