[erlang-questions] application:is_started?

Chandru <>
Tue Oct 16 11:47:28 CEST 2007


On 16/10/2007, YC <> wrote:
> Hi all -
> I've noticed that the application library doesn't provide an equivalent of a
> is_started function, so I'm wondering whether there is an idiom to check
> whether an app is running:
>
> 1) Are functions expected to derived the result from checking {ok, Pid} or
> {error, already_started} everytime they want to use an application? or
>
> 2) Are functions expected to simply call the interface provided by the app
> w/out regard to whether the app is started? or
>
> 3) Are there ways to ensure the application in question is started.
>

6> application:info().
[{loaded,[{kernel,"ERTS  CXC 138 10","2.10.6"},
          {stdlib,"ERTS  CXC 138 10","1.13.5"},
          {sasl,"SASL  CXC 138 11","2.0.1"}]},
 {loading,[]},
 {started,[{sasl,permanent},{stdlib,permanent},{kernel,permanent}]},
 {start_p_false,[]},
 {running,[{sasl,<0.28.0>},{stdlib,undefined},{kernel,<0.7.0>}]},
 {starting,[]}]



More information about the erlang-questions mailing list