* 1.5.10: Apache, CGIs giving "User defined signal 2" or silent failure
@ 2004-08-01 23:54 jhart
2004-08-02 2:01 ` elijah wright
0 siblings, 1 reply; 2+ messages in thread
From: jhart @ 2004-08-01 23:54 UTC (permalink / raw)
To: cygwin
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: 1.5.10: Apache, CGIs giving "User defined signal 2" or silent failure
2004-08-01 23:54 1.5.10: Apache, CGIs giving "User defined signal 2" or silent failure jhart
@ 2004-08-02 2:01 ` elijah wright
0 siblings, 0 replies; 2+ messages in thread
From: elijah wright @ 2004-08-02 2:01 UTC (permalink / raw)
To: jhart; +Cc: cygwin
> 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:
what happens if you give the full paths to curl and awk, rather than just
assuming they're in the path?
--elijah
--
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-08-02 2:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-01 23:54 1.5.10: Apache, CGIs giving "User defined signal 2" or silent failure jhart
2004-08-02 2:01 ` elijah wright
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).