Re: gen_tcp:connect will close when using supervisor.

Fred Hebert <[email protected]>
Newsgroups gmane.comp.lang.erlang.general
Message-ID <CAFA3VZKvL4Fr_ZMfUofvb81DHpWOM2FOEdYPvzyFWP+d3U1Y6A@mail.gmail.com>
While this is true, we also typically recommend not deploying from the
shell, and until earlier this year had a very visible warning always
displayed advising people not to do that. The rebar3 shell is meant for
development first and foremost, and has default configured options that are
convenient for rebar3 but may not fit your application and that you may not
want to marry yourself to in the long run.

If you want to see `rebar3 new release my_app`, you will get everything
required in the configuration file and structure to call 'rebar3 release'
and generate the release you can boot with a single script whose path is
output at the end of the command.

Regards,
Fred.

On Tue, Nov 24, 2020 at 10:38 AM Roger Lipscombe <[email protected]>
wrote:

> On Tue, 24 Nov 2020 at 14:27, Jesper Louis Andersen
> <[email protected]> wrote:
> > The right way of solving this is to start using applications. An
> application has a top-level supervisor which is then handled by the
> application manager in the system, and thus not being shut down as long as
> the VM is running. It's a bit of a curve-ball I'm throwing you, I'm afraid.
> Applications are far more involved to set up
>
> I agree that applications are the way to go. I disagree that you need
> all of the extra release baggage, at least at the start.
>
> $ rebar3 new app my_app
> $ cd my_app
> (...create your gen_server and add it to my_app_sup...)
> $ rebar3 shell
>
> Done. You can look at how to do releases later.
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.