On 11/06/2015 12:18 PM, Jose Antonio Espinosa wrote:
> I'm using aroute library to develop a small http interface. Everything
> is ok and I start the server with:
> http_server(route, [port(8008)]).
> I want the server still up in a linux machine, but I cannot make the
> swipl process run in the background. I tried the http_daemon, but I am
> unable to know how to pass the router to http_daemon
I think the daemon code is hard coded to call the http_dispatch router.
> I'm very new to swi, so it is possible I just have not read all the
> information. But I need have the http server running in non interactive
> mode in the background.
Most of the rest in the daemon code is useful for a proper daemon though
(command line arguments, syslog, user management, etc.). If you just
want to avoid stopping, you must prevent Prolog to return to the
toplevel. You can do so by calling e.g., thread_get_message(quit).
Cheers --- Jan
> You received this message because you are subscribed to the Google
> Groups "SWI-Prolog" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to swi-prolog+...@googlegroups.com
> Visit this group at http://groups.google.com/group/swi-prolog
> For more options, visit https://groups.google.com/d/optout