<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>Joe Armstrong <<a href="mailto:erlang@gmail.com">erlang@gmail.com</a>> kirjoitti 22.2.2013 kello 20.31:</div><br><blockquote type="cite"><div><br></div><div>This launches erlang/cowboy "on demand"</div><div><br></div><div>2) I fetch a web page from "<a href="http://localhost:11234/">http://localhost:11234</a>"</div><div><br></div><div>Erlang starts and starts cowboy</div><div><br></div><div>Anybody know what the magic stuff in joe.experiments.plist is?</div></blockquote><div><br></div><div>Hi (and apologies for the double post, this was intended to the list)</div><div><br></div><div>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.</div><div><br></div><div>The file format documentation (man 5 launchd.plist) specifies how to configure the socket and there's some Apple sample code here:</div><div><br></div><div><a href="https://developer.apple.com/library/mac/#samplecode/SampleD/Introduction/Intro.html">https://developer.apple.com/library/mac/#samplecode/SampleD/Introduction/Intro.html</a></div><div><br></div><div>A full example with plist is included in the download, but the sample launchd plist file is not visible in the web site.</div><div><br></div><div><br></div><div>br,</div><div>Jarimatti</div></div></body></html>