How to stop an Application

Ulf Wiger <>
Tue Jan 7 10:42:43 CET 2003

On Mon, 6 Jan 2003, Suresh S wrote:

>Hi ,
>This is the start module of my aplicaiton,
>there r two call back functions start and stop
>So can i use stop function (i.e entry_app:stop([])
>from an other module) to stop this applicaiton

The way to stop the application would be


(or whatever the actual application is called, if it`s not

The application controller will call the entry_app:stop/1
function to allow for e.g. some cleanup procedures to

Similarly, you use application:start(entry_app) to start the
application. Depending on what you want to see happen if an
application crashes, you could use either

application:start(entry_app, permanent)

(which means the node will terminate if your application


application:start(entry_app, temporary)

(which means the node will stay up.)

In the file, you need to insert a `mod`
attribute like so:

{mod, {entry_app, []}}

([] will work fine, since your entry_app module doesn`t care
about the args anyway.)


>i am calling stop function but it is not working
>what parameter i have to pass to this stop function
>inorder to stop the application from an other module.
>start(Type, _Args) ->
>    io:format("In Application Start Module.~n"),
>    entry_sup:start_link().
>stop(S) ->
>    ok.
>Thanks in advace
>suresh s
>Missed your favourite TV serial last night? Try the new, Yahoo! TV.
>       visit

Ulf Wiger, Senior Specialist,
   / / /   Architecture & Design of Carrier-Class Software
  / / /    Strategic Product & System Management
 / / /     Ericsson Telecom AB, ATM Multiservice Networks

More information about the erlang-questions mailing list