[erlang-questions] Stopping Application in erlang.

Rad Gruchalski radek@REDACTED
Mon Mar 30 12:27:06 CEST 2015


Obviously, you export stop/1 and the error tells you stop/0 is undefined.  
Call it as

uclient:stop(normal) and you’ll get an ok back.










Kind regards,

Radek Gruchalski

radek@REDACTED (mailto:radek@REDACTED)
 (mailto:radek@REDACTED)
de.linkedin.com/in/radgruchalski/ (http://de.linkedin.com/in/radgruchalski/)

Confidentiality:
This communication is intended for the above-named person and may be confidential and/or legally privileged.
If it has come to you in error you must take no action based on it, nor must you copy or show it to anyone; please delete/destroy and inform the sender immediately.



On Monday, 30 March 2015 at 12:24, harsha sri wrote:

> Hi,
>  
> I am running appication with Supervisor & Worker model.
> Can anybody guide me through how to stop application or restart my application.
>  
> Below is my application file:
>  
> -module(uclient).
>  
> -behaviour(application).
>  
> -export([start/2, stop/1]).
>  
> -record(state, {pid}).
>  
> start(normal, []) ->
>    case uclient_sup:start_link({uclient_sup}) of
>       {ok, Pid} -> {ok, Pid};
>       Error -> Error
>    end.
>    %%uclient_sup:start_link({uclient_sup}).
>  
> stop(_State) ->
>     ok.
>  
>  
>  
> Tried to stop application from erl command line, but getting error as below:
>  
> uclient:stop().
> ** exception error: undefined function uclient:stop/0
>  
> Regards,
> Harsha
>  
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED (mailto:erlang-questions@REDACTED)
> http://erlang.org/mailman/listinfo/erlang-questions
>  
>  


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150330/33e78454/attachment.htm>


More information about the erlang-questions mailing list