[racket] raco exe difficutly with Release 5.3.1 & stateless web server

From: Haiwei Zhou (highfly22 at gmail.com)
Date: Sun Jan 27 06:58:26 EST 2013

Hi,

You should add function do-not-return at the end of the file.
Or use command plt-web-server

Regards,
Haiwei


On 27 January 2013 13:02, Galler <lzgaller at optonline.net> wrote:

> Hello,
>
> I encountered difficulty compiling a #lang web server application after
> upgrading to v.5.3.1 from v5.3 last night. O/S is WinXP service pack 3
>
> The executable would compile into an .exe file.
>
> But when run,  a console window would briefly open then close.
>
> The program did not execute.
>
> I was able to reproduce the bad behavior with the following minimal source
> code, and the following raco script, which appear below.
>
>
> I further note that the minimal program can be successfully run in
> DrRacket, and can be compiled and run *without* encountering the problem by
> adding the -l launcher flag to the raco script. Successful execution
> results in a browser window opening with 'hello world' appearing in the
> loaded document.
>
> Any guidance would be sincerely appreciated.
>
> Thanks
>
> Zack
>
>
> ;START RACO SCRIPT
>
> raco exe simplest-raco-failure.rkt
>
> ;END RACO SCRIPT
>
>
> ;START SOURCE CODE
>
> #lang web-server
>
> (require  web-server/servlet-env)
>
> (define (start request)
>   (let ((response-generator (λ (make-url)
>                               (response/xexpr `(html (head )
>                                                      (body "hello
> world"))))))
>     (send/suspend/dispatch response-generator)))
>
>
>
> (serve/servlet start
>                #:stateless? #t
>                #:launch-browser? #t
>                #:connection-close? #t
>                #:quit? #f
>                #:listen-ip #f
>                #:port 8000
>                #:servlet-path "/")
>
>
> ;END SOURCE CODE
>
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/**users <http://lists.racket-lang.org/users>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130127/845cc596/attachment.html>

Posted on the users mailing list.