Re: http server in ackground
Jan Wielemaker <[email protected]> Thu, 10 Apr 2014 09:38:31 +0200
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
On 04/09/2014 09:59 PM, Josef Fydl wrote: > I have a http server, which I want to run forever in iCloud, > unfortunately terminal is kicked off after period of no activity, > > I tried swipl -s myServer.pl -g start -q & > > on my mac and can not reach it from browser, also port shows in issuing netstat -vatn > > Same on the linux node. Can you please tell me what I do wrong? > swipl -s myServer.pl -g start -q works OK in both cases? You have to avoid that the toplevel wants to read. The normal way is to make the toplevel execute e.g. thread_get_message(quit). E.g run :- http_server(http_dipatch, [port(8080)]), thread_get_message(quit). Cheers ---- Jan > > _______________________________________________ > SWI-Prolog mailing list > [email protected] > https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog >