httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [users@httpd] Apache 1.3, Cygwin, CGIs giving "User defined signal 2" or silent failure (Modified by
Date Fri, 06 Aug 2004 18:13:35 GMT
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

#!/bin/gawk -f
         print "Content-type: text/plain\n"
         cmd = "curl -s"
         #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 sometimes 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 changing the memory allocations for the Cygwin shortcut. 
still fails in the same way, but there is no error message in the log.

I also tried running in Windows 2000 compatibility mode. That made no 

There are no messages in the Windows System log.

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, 
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:

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

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message