erlang application starts

 (1) erlang during application startup, you can also start in stages.
          In the resource file erlang application * .app can be defined step by step start.
            * value start_phase field .app can specify multiple parameters are starting
            to call the timing of start_phase is to start after the call.
     (2) erlang is a distributed language, when you start the application feeling and C / C ++ / Java / python has a significant difference, because there is no main function
          fact, this is already a published application with non-release formula the difference between programs.
          If you are already a published application, when you start the installation, there are still the main function.
          Similar to Java, Java JVM is using C language development, erlang virtual machine is developed in C, non-published application startup,
          such as: application: start (appName), which is activated in a virtual machine.
          
         erl is actually a shell script, it actually called in erl script is erlexec, the entrance of this program is erlexec.c.
         erlexec the main function first parses the incoming command-line arguments and environment variables, and then look for beam executable file,
         and then run through execv Beam virtual machine, erlexec is a loader, in this process will be passed to the command line arguments init process virtual machine.
         This time found erlang is like an operating system, linux operating system also has the init process.

 

【转】http://blog.chinaunix.net/uid-25418340-id-3517908.html

Guess you like

Origin www.cnblogs.com/hshy/p/11097719.html