[erlang-questions] application:start() without "ghost" processes

Ulf Wiger (TN/EAB) ulf.wiger@REDACTED
Mon Jun 11 11:32:18 CEST 2007


All top-level runnable applications must create
a process.

If you include the applications inside another 
application, they won't be started by default,
but if you specify start_phases (see the man page
for 'application'), you can execute code in the 
included applications.

(An application can include other applications 
using the included_applications key. The list 
of included applications can be modified in
the .rel file as well, but it can only be 
reduced - you can't add included apps in the 
.rel file.)

BR,
Ulf W

> -----Original Message-----
> From: erlang-questions-bounces@REDACTED 
> [mailto:erlang-questions-bounces@REDACTED] On Behalf Of Mazen
> Sent: den 11 juni 2007 10:14
> To: erlang-questions@REDACTED
> Subject: [erlang-questions] application:start() without 
> "ghost" processes
> 
> 
> Two questions:
> 
> 1) Anyone out there who has a neat way of running a 
> module:fun() on startup of an application? Similar to the 
> module:start() callback but without the hassle of having to 
> create a "ghost" process just to keep the whole thing from crashing.
> 
> Right now I have 3 applications that are static but I create 
> 3 "ghost" processes just to run them. One can argue that it's 
> "just 3 processes" but the principal of the matter is that I 
> am forced to do it in this (imho) ugly way.
> 
> 2) Maybe an onload() callback in the specified application 
> module OR the ability to return {ok, noproc} instead of {ok, 
> Pid} would help alot?
> _________________________________________________________
> Post sent from http://www.trapexit.org
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
> 



More information about the erlang-questions mailing list