[erlang-questions] Waiting for a node to start using run_erl

Garrett Smith g@REDACTED
Sat Jun 29 16:13:01 CEST 2013


What is "started" in this case?

A node start is a system startup, much like an OS start. There should
be a point that you system is "ready" to server/act/etc. Once you
establish that point, test for for it.

Just as an example of why this isn't always straight forward, consider
a socket server (e.g. a web server). You might define "ready" as soon
as the server is accepting connections on a port, which is easy to
test for. But the server might in fact be ready several seconds later
as database connections are opened, caches warmed, whatever. So a
ready test might be a 200 response on a particular http request (which
is able to test for all those conditions).

On Sat, Jun 29, 2013 at 8:42 AM, Yash Ganthe
<yash_ganthe@REDACTED> wrote:
> Hi,
>
>
>
> When staring an erl node using run_erl, if the -daemon switch is used,
> control returns to the terminal immediately without letting me know whether
> the node was really started.
>
> The switch is recommended in the documentation at:
> http://erlang.org/doc/man/run_erl.html
>
>
>
> It says: Without this option, run_erl must be started using several tricks
> in the shell to detach it completely from the terminal in use when starting
> it.
>
>
>
> Is there a way to use run_erl and ensure that the node is started. This
> would be especially useful when starting the node from a shell script using
> run_erl.
>
>
>
> Thanks,
>
> Yash
>
> DISCLAIMER ========== This e-mail may contain privileged and confidential
> information which is the property of Persistent Systems Ltd. It is intended
> only for the use of the individual or entity to which it is addressed. If
> you are not the intended recipient, you are not authorized to read, retain,
> copy, print, distribute or use this message. If you have received this
> communication in error, please notify the sender and delete all copies of
> this message. Persistent Systems Ltd. does not accept any liability for
> virus infected mails.
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list