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/