From: Pascal B. <pj...@in...> - 2017-03-28 00:32:56
|
> On 27 Mar 2017, at 20:23, Jean Louis <bu...@gn...pport> wrote: > > Previous message was not well formulated: > > The "program" is here: > > (defun main () > (ext:exit 0)) > > is saved as memory image test.cgi > > I would like to simply exit as CGI program. When I make the memory > image, and run > http://localhost/test.cgi?a or if I put any char after cgi, like / or ?a=1 the memory image is exiting or giving its output > > If I just call it with > wget -O /dev/shm/test "http://localhost/order.cgi" > > I get after longer waiting of about 45 seconds following output: > > *** - Ctrl-C: User break > Break 1 [1]> > > > How can I avoid that? It is for the security of the CGI execution, tht > without parameters it should simply exit, but exiting seem a problem to me. You should print out HTTP headers. You can use them to report some status. Something like: #!/usr/local/bin/clisp -q -ansi -norc -E utf-8 ;; -*- mode:lisp;coding:utf-8 -*- (defun main () (write-string "Content-Type: text/plain Content-Length: 0 Status: 204 ") (finish-output) (ext:exit 0)) (main) -- __Pascal J. Bourguignon__ |