[erlang-questions] anybody know how to start erlang (cowboy) with launchd on mac.

Joe Armstrong erlang@REDACTED
Sat Feb 23 17:41:24 CET 2013


On Sat, Feb 23, 2013 at 2:08 PM, Jarimatti Valkonen <
jarimatti.valkonen@REDACTED> wrote:

> Joe Armstrong <erlang@REDACTED> kirjoitti 22.2.2013 kello 20.31:
>
>
> This launches erlang/cowboy "on demand"
>
> 2) I fetch a web page from "http://localhost:11234"
>
> Erlang starts and starts cowboy
>
> Anybody know what the magic stuff in joe.experiments.plist is?
>
>
> Hi (and apologies for the double post, this was intended to the list)
>
> If you want to launch on-demand when a socket connection is made, then
> AFAIK it's a bit more complicated than just editing the launchd property
> list. Launchd listens on the socket and passes the socket into the actual
> program in it's own data structure.
>

UUm sounds tricky - I actually adopted Tony's method. I start a distributed
Erlang node
with a KeepAlive flag and get it to start cowboy. Not quite the same thing
but good enough for
my purposes

Cheers

/Joe


>
> The file format documentation (man 5 launchd.plist) specifies how to
> configure the socket and there's some Apple sample code here:
>
>
> https://developer.apple.com/library/mac/#samplecode/SampleD/Introduction/Intro.html
>
> A full example with plist is included in the download, but the sample
> launchd plist file is not visible in the web site.
>
>
> br,
> Jarimatti
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130223/5fdf44e3/attachment.htm>


More information about the erlang-questions mailing list