[erlang-questions] application:is_started?

YC <>
Tue Oct 16 06:57:47 CEST 2007

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.

I'm thinking of library modules where each function can be called
independently but depend on some underlying applications.  An example is a
wrapper onto of the crypto app - because crypto needs to be started, either
I have to make the wrapper into another server or I would have to test
whether the crypto app is started on every function.

Would love to see what type of code structure is "good" - any thoughts are

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20071015/ea284e94/attachment.html>

More information about the erlang-questions mailing list