httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jh...@bates.edu
Subject [users@httpd] Apache 1.3, Cygwin, CGIs giving "User defined signal 2" or silent failure (Modified by jhart@bates.edu)
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
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 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. 
The CGI
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 
difference.

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



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:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message