[erlang-questions] erlang restart application

Loïc Hoguin essen@REDACTED
Sat Mar 8 18:00:28 CET 2014


Hello,

Yep most of these questions relate to OTP itself as you found out. I 
don't plan to explain all the details in the documentation. :-)

On the other hand the erlang.mk docs are getting a complete rewrite with 
a lot more details filled in and that should land in a few weeks.

On 03/08/2014 11:52 AM, t x wrote:
> @Loic:
>
>    Thanks! This was extremely clear and helpful.
>
> =================================
>
> As a follow up question, is there documentation for erlang.mk
> anywhere? I know of the README at https://github.com/extend/erlang.mk
> , but it's a bit short on details.
>
> I'm also aware of https://github.com/erlware/relx/wiki/configuration
> but I don't really understand it.
>
>
> What I really want to understand is what happens behind the scenes, a
> detailed description of:
>
>    * when I run _rel/bin/websocket_example start
>    * how does this use src/websocket.app.src
>
>    * what processes are created? (clearly websocket_app.erl is called)
>    * what options are they called with
>
>    * and questions I'm not even asking
>
>
> I feel that when I run:
>
> make; _rel/bin/websocket_example console
>
>    there's _alot_ of stuff (compared to say, what Programming Erlang,
> up to chapter 18, covers) going on behind the scenes.
>
> I'd really like to understand what is happening behind the scenes for
> debugging purposes.
>
>
> What tutorial should I be going through?
>
> Thanks!
>
>
>
>
>
> On Fri, Mar 7, 2014 at 11:21 PM, Loïc Hoguin <essen@REDACTED> wrote:
>> It's not explained in the getting started on purpose, as this is an advanced
>> topic.
>>
>> Basically this is an OTP application, where hello_erlang_app is an
>> application behaviour and the hello_erlang_sup is the main supervisor of
>> that application.
>>
>> To answer your question, you can just use:
>>
>> application:stop(hello_erlang).
>> application:start(hello_erlang).
>>
>> With hello_erlang the name of the application.
>>
>> On the other hand you have a release, which means c(hello_erlang_app)
>> doesn't operate on your src/ directory anymore (you don't need to use l/1
>> after using c/1 by the way as it already does it), so the quickest way is
>> most likely to just Ctrl+C twice, type make and restart the VM again.
>> Another way is to use a reloader that understands releases.
>>
>> But yeah, I wouldn't worry about these things for quite some time as you
>> don't need to know them to operate Cowboy.
>>
>>
>> On 03/08/2014 08:13 AM, t x wrote:
>>>
>>> Hi,
>>>
>>>
>>> [apologies for this stream of stupid questions; I haven't figured out
>>> how the various pieces work together yet]
>>>
>>>
>>>     I'm reading
>>> http://ninenines.eu/docs/en/cowboy/HEAD/guide/getting_started/
>>>
>>>
>>>     In particular, I'm looking at https://gist.github.com/txrev319/9426556
>>>
>>>
>>>     How does the
>>>
>>>       {registered, [hello_erlang_sup]},
>>>       {mod, {hello_erlang_app, []}},
>>>
>>>     lines work?
>>>
>>>
>>>     In particular, how can I restart the hello_erlang_app app ?
>>>
>>>     So after I do "_rel/..../ remote_console", I do:
>>>
>>>     * c(hello_erlang_app).
>>>     * l(hello_erlang_app).
>>>
>>>     --> now, at this point, how do I _restart_ the existing
>>> hello_erlang_app ?
>>>
>>>
>>> Thanks!
>>> _______________________________________________
>>> erlang-questions mailing list
>>> erlang-questions@REDACTED
>>> http://erlang.org/mailman/listinfo/erlang-questions
>>>
>>
>> --
>> Loïc Hoguin
>> http://ninenines.eu

-- 
Loïc Hoguin
http://ninenines.eu



More information about the erlang-questions mailing list