I changed a new way
Import libfcgi.so to run it
I thought it will work, BUT NEWLISP DISPOINTED ME AGAIN!
Code: Select all
#!/usr/bin/newlisp
(import "/usr/local/lib/libfcgi.so.0.0.0" "FCGI_Accept")
(while (>= (FCGI_Accept) 0)
; (net-send 1 (pack "c c c c c c c c" 0x01 0x06 0x00 0x01 0x00 0x57 0x00 0x00))
(print "Content-type: text/html\r\n\r\n"
"<title>Newlisp FastCGI Hello!</title>"
"<h1>FastCGI Hello!</h1>" )
)
run it by spawn-fcgi
Code: Select all
spawn-fcgi -p 9000 -f /tmp/fcgi.lsp
ANYBODY can tell me why?
I used wireshark to capture the process
it turned out to be this program only send a fastcgi foot to browser
Did I miss something ?