Sophie

Sophie

distrib > Mageia > 7 > aarch64 > by-pkgid > ca236e080672a3aa5beda2fe21b8473d > files > 843

erlang-doc-21.2.5-1.mga7.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns:erl="http://erlang.org" xmlns:fn="http://www.w3.org/2005/02/xpath-functions">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../doc/otp_doc.css" type="text/css">
<title>Erlang -- script</title>
</head>
<body>
<div id="container">
<script id="js" type="text/javascript" language="JavaScript" src="../../../../doc/js/flipmenu/flipmenu.js"></script><script id="js2" type="text/javascript" src="../../../../doc/js/erlresolvelinks.js"></script><script language="JavaScript" type="text/javascript">
            <!--
              function getWinHeight() {
                var myHeight = 0;
                if( typeof( window.innerHeight ) == 'number' ) {
                  //Non-IE
                  myHeight = window.innerHeight;
                } else if( document.documentElement && ( document.documentElement.clientWidth ||
                                                         document.documentElement.clientHeight ) ) {
                  //IE 6+ in 'standards compliant mode'
                  myHeight = document.documentElement.clientHeight;
                } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
                  //IE 4 compatible
                  myHeight = document.body.clientHeight;
                }
                return myHeight;
              }

              function setscrollpos() {
                var objf=document.getElementById('loadscrollpos');
                 document.getElementById("leftnav").scrollTop = objf.offsetTop - getWinHeight()/2;
              }

              function addEvent(obj, evType, fn){
                if (obj.addEventListener){
                obj.addEventListener(evType, fn, true);
                return true;
              } else if (obj.attachEvent){
                var r = obj.attachEvent("on"+evType, fn);
                return r;
              } else {
                return false;
              }
             }

             addEvent(window, 'load', setscrollpos);

             //--></script><div id="leftnav"><div class="innertube">
<div class="erlang-logo-wrapper"><a href="../../../../doc/index.html"><img alt="Erlang Logo" src="../../../../doc/erlang-logo.png" class="erlang-logo"></a></div>
<p class="section-title">System Architecture Support Libraries (SASL)</p>
<p class="section-subtitle">Reference Manual</p>
<p class="section-version">Version 3.3</p>
<ul class="panel-sections">
<li><a href="users_guide.html">User's Guide</a></li>
<li><a href="index.html">Reference Manual</a></li>
<li><a href="release_notes.html">Release Notes</a></li>
<li><a href="../pdf/sasl-3.3.pdf">PDF</a></li>
<li><a href="../../../../doc/index.html">Top</a></li>
</ul>
<ul class="expand-collapse-items">
<li><a href="javascript:openAllFlips()">Expand All</a></li>
<li><a href="javascript:closeAllFlips()">Contract All</a></li>
</ul>
<h3>Table of Contents</h3>
<ul class="flipMenu">
<li title="sasl (App)"><a href="sasl_app.html">sasl (App)
                </a></li>
<li id="no" title="alarm_handler " expanded="false">alarm_handler<ul>
<li><a href="alarm_handler.html">
                  Top of manual page
                </a></li>
    <li title="clear_alarm-1"><a href="alarm_handler.html#clear_alarm-1">clear_alarm/1</a></li>
    <li title="get_alarms-0"><a href="alarm_handler.html#get_alarms-0">get_alarms/0</a></li>
    <li title="set_alarm-1"><a href="alarm_handler.html#set_alarm-1">set_alarm/1</a></li>
    </ul>
</li>
<li id="no" title="rb " expanded="false">rb<ul>
<li><a href="rb.html">
                  Top of manual page
                </a></li>
    <li title="filter-1"><a href="rb.html#filter-1">filter/1</a></li>
    <li title="filter-2"><a href="rb.html#filter-2">filter/2</a></li>
    <li title="grep-1"><a href="rb.html#grep-1">grep/1</a></li>
    <li title="h-0"><a href="rb.html#h-0">h/0</a></li>
    <li title="help-0"><a href="rb.html#help-0">help/0</a></li>
    <li title="list-0"><a href="rb.html#list-0">list/0</a></li>
    <li title="list-1"><a href="rb.html#list-1">list/1</a></li>
    <li title="log_list-0"><a href="rb.html#log_list-0">log_list/0</a></li>
    <li title="log_list-1"><a href="rb.html#log_list-1">log_list/1</a></li>
    <li title="rescan-0"><a href="rb.html#rescan-0">rescan/0</a></li>
    <li title="rescan-1"><a href="rb.html#rescan-1">rescan/1</a></li>
    <li title="show-0"><a href="rb.html#show-0">show/0</a></li>
    <li title="show-1"><a href="rb.html#show-1">show/1</a></li>
    <li title="start-0"><a href="rb.html#start-0">start/0</a></li>
    <li title="start-1"><a href="rb.html#start-1">start/1</a></li>
    <li title="start_log-1"><a href="rb.html#start_log-1">start_log/1</a></li>
    <li title="stop-0"><a href="rb.html#stop-0">stop/0</a></li>
    <li title="stop_log-0"><a href="rb.html#stop_log-0">stop_log/0</a></li>
    </ul>
</li>
<li id="no" title="release_handler " expanded="false">release_handler<ul>
<li><a href="release_handler.html">
                  Top of manual page
                </a></li>
    <li title="check_install_release-1"><a href="release_handler.html#check_install_release-1">check_install_release/1</a></li>
    <li title="check_install_release-2"><a href="release_handler.html#check_install_release-2">check_install_release/2</a></li>
    <li title="create_RELEASES-4"><a href="release_handler.html#create_RELEASES-4">create_RELEASES/4</a></li>
    <li title="downgrade_app-2"><a href="release_handler.html#downgrade_app-2">downgrade_app/2</a></li>
    <li title="downgrade_app-3"><a href="release_handler.html#downgrade_app-3">downgrade_app/3</a></li>
    <li title="downgrade_script-3"><a href="release_handler.html#downgrade_script-3">downgrade_script/3</a></li>
    <li title="eval_appup_script-4"><a href="release_handler.html#eval_appup_script-4">eval_appup_script/4</a></li>
    <li title="install_file-2"><a href="release_handler.html#install_file-2">install_file/2</a></li>
    <li title="install_release-1"><a href="release_handler.html#install_release-1">install_release/1</a></li>
    <li title="install_release-2"><a href="release_handler.html#install_release-2">install_release/2</a></li>
    <li title="make_permanent-1"><a href="release_handler.html#make_permanent-1">make_permanent/1</a></li>
    <li title="reboot_old_release-1"><a href="release_handler.html#reboot_old_release-1">reboot_old_release/1</a></li>
    <li title="remove_release-1"><a href="release_handler.html#remove_release-1">remove_release/1</a></li>
    <li title="set_removed-1"><a href="release_handler.html#set_removed-1">set_removed/1</a></li>
    <li title="set_unpacked-2"><a href="release_handler.html#set_unpacked-2">set_unpacked/2</a></li>
    <li title="unpack_release-1"><a href="release_handler.html#unpack_release-1">unpack_release/1</a></li>
    <li title="upgrade_app-2"><a href="release_handler.html#upgrade_app-2">upgrade_app/2</a></li>
    <li title="upgrade_script-2"><a href="release_handler.html#upgrade_script-2">upgrade_script/2</a></li>
    <li title="which_releases-0"><a href="release_handler.html#which_releases-0">which_releases/0</a></li>
    <li title="which_releases-1"><a href="release_handler.html#which_releases-1">which_releases/1</a></li>
    </ul>
</li>
<li id="no" title="systools " expanded="false">systools<ul>
<li><a href="systools.html">
                  Top of manual page
                </a></li>
    <li title="make_relup-3"><a href="systools.html#make_relup-3">make_relup/3</a></li>
    <li title="make_relup-4"><a href="systools.html#make_relup-4">make_relup/4</a></li>
    <li title="make_script-1"><a href="systools.html#make_script-1">make_script/1</a></li>
    <li title="make_script-2"><a href="systools.html#make_script-2">make_script/2</a></li>
    <li title="make_tar-1"><a href="systools.html#make_tar-1">make_tar/1</a></li>
    <li title="make_tar-2"><a href="systools.html#make_tar-2">make_tar/2</a></li>
    <li title="script2boot-1"><a href="systools.html#script2boot-1">script2boot/1</a></li>
    </ul>
</li>
<li title="appup"><a href="appup.html">appup</a></li>
<li title="rel"><a href="rel.html">rel</a></li>
<li title="relup"><a href="relup.html">relup</a></li>
<li title="script"><a href="script.html">script</a></li>
</ul>
</div></div>
<div id="content">
<div class="innertube">
<!-- refpage --><center><h1>script</h1></center>
  
  <h3><span onMouseOver="document.getElementById('ghlink-file-idm281472970937768').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-file-idm281472970937768').style.visibility = 'hidden';"><span id="ghlink-file-idm281472970937768"></span><a class="title_link" name="file" href="#file">File</a></span></h3>
<div class="REFBODY file-body">script</div>
  <h3><span onMouseOver="document.getElementById('ghlink-file-summary-idm281472970937320').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-file-summary-idm281472970937320').style.visibility = 'hidden';"><span id="ghlink-file-summary-idm281472970937320"></span><a class="title_link" name="file-summary" href="#file-summary">File Summary</a></span></h3>
<div class="REFBODY file-summary-body">Boot script</div>
  <h3><span onMouseOver="document.getElementById('ghlink-description-idm281472970936872').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-description-idm281472970936872').style.visibility = 'hidden';"><span id="ghlink-description-idm281472970936872" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/sasl/doc/src/script.xml#L39" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="description" href="#description">Description</a></span></h3>
<div class="REFBODY description-body"><p>
    <p>The <strong>boot script</strong> describes how the Erlang runtime system
      is started. It contains instructions on which code to load and
      which processes and applications to start.</p>
    <p>Command <span class="code">erl -boot Name</span> starts the system with a boot
      file called <span class="code">Name.boot</span>, which is generated from the
      <span class="code">Name.script</span> file, using 
    <span class="bold_code bc-15"><a href="systools.html#script2boot-1"><span class="code">systools:script2boot/1</span></a></span>.</p>
    <p>The <span class="code">.script</span> file is generated by <span class="code">systools</span> from a
      <span class="code">.rel</span> file and from <span class="code">.app</span> files.</p>
  </p></div>

  <h3><span onMouseOver="document.getElementById('ghlink-file-syntax-idm281472970930168').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-file-syntax-idm281472970930168').style.visibility = 'hidden';"><span id="ghlink-file-syntax-idm281472970930168" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/sasl/doc/src/script.xml#L51" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="file-syntax" href="#file-syntax">File Syntax</a></span></h3>
<div class="REFBODY rb-3">
    
    <p>The boot script is stored in a file with extension
      <span class="code">.script</span>. The file has the following syntax:</p>
    <div class="example"><pre>{script, {Name, Vsn},
 [
  {progress, loading},
  {preLoaded, [Mod1, Mod2, ...]},
  {path, [Dir1,"$ROOT/Dir",...]}.
  {primLoad, [Mod1, Mod2, ...]},
  ...
  {kernel_load_completed},
  {progress, loaded},
  {kernelProcess, Name, {Mod, Func, Args}},
  ...
  {apply, {Mod, Func, Args}},
  ...
  {progress, started}]}.</pre></div>
    <dl>
      <dt><strong><span class="code">Name = string()</span></strong></dt>
        <dd><p>Defines the system name.</p></dd>
      <dt><strong><span class="code">Vsn = string()</span></strong></dt>
        <dd><p>Defines the system version.</p></dd>
      <dt><strong><span class="code">{progress, Term}</span></strong></dt>
        <dd><p>Sets the "progress" of the initialization
	  program. The
          <span class="bold_code bc-13"><a href="javascript:erlhref('../../../../doc/../','erts','init.html#get_status-0');"><span class="code">init:get_status/0</span></a></span>
	  function returns the current value of the progress, which is
      <span class="code">{InternalStatus,Term}</span>.</p></dd>
      <dt><strong><span class="code">{path, [Dir]}</span></strong></dt>
        <dd>
<p><span class="code">Dir</span> is a string. This
          argument sets the load path of the system to <span class="code">[Dir]</span>. The
          load path used to load modules is obtained from the initial
          load path, which is given in the script file, together with
          any path flags that were supplied in the command-line
          arguments. The command-line arguments modify the path as
          follows:</p>
        <ul>
          <li>
<span class="code">-pa Dir1 Dir2 ... DirN</span> adds the directories
          <span class="code">DirN, DirN-1, ..., Dir2, Dir1</span> to the front of the initial
           load path.</li>
          <li>
<span class="code">-pz Dir1 Dir2 ... DirN</span> adds the directories
          <span class="code">Dir1, Dir2, ..., DirN</span> to the end of the initial
           load path.</li>
          <li>
            <p><span class="code">-path Dir1 Dir2 ... DirN</span> defines a set of
              directories <span class="code">Dir1, Dir2, ..., DirN</span>, which replace
              the search path given in the script file. Directory names
              in the path are interpreted as follows:</p>
            <ul>
              <li>Directory names starting with <span class="code">/</span> are assumed
               to be absolute path names.</li>
              <li>Directory names not starting with <span class="code">/</span> are
               assumed to be relative the current working directory.</li>
              <li>The special <span class="code">$ROOT</span> variable can only be used
               in the script, not as a command-line argument. The
               given directory is relative the Erlang installation
               directory.</li>
            </ul>
          </li>
        </ul>
	</dd>
      <dt><strong><span class="code">{primLoad, [Mod]}</span></strong></dt>
        <dd><p>Loads the modules <span class="code">[Mod]</span>
        from the directories specified in <span class="code">Path</span>. The script
        interpreter fetches the appropriate module by calling
        <span class="bold_code bc-13"><a href="javascript:erlhref('../../../../doc/../','erts','erl_prim_loader.html#get_file-1');"><span class="code">erl_prim_loader:get_file(Mod)</span></a></span>. A fatal error
        that terminates the system occurs if the module cannot be
        located.</p></dd>
      <dt><strong><span class="code">{kernel_load_completed}</span></strong></dt>
        <dd><p>Indicates that all modules
        that <strong>must</strong> be loaded <strong>before</strong> any processes
        are started are loaded. In interactive mode, all
        <span class="code">{primLoad,[Mod]}</span> commands interpreted after this
        command are ignored, and these modules are loaded on demand.
        In embedded mode, <span class="code">kernel_load_completed</span> is ignored, and
        all modules are loaded during system start.</p></dd>
      <dt><strong><span class="code">{kernelProcess, Name, {Mod, Func, Args}}</span></strong></dt>
        <dd><p>Starts the
        "kernel process" <span class="code">Name</span>
        by evaluating <span class="code">apply(Mod, Func, Args)</span>. The start function is
        to return <span class="code">{ok, Pid}</span> or <span class="code">ignore</span>. The <span class="code">init</span>
        process monitors the behavior of <span class="code">Pid</span> and terminates
        the system if <span class="code">Pid</span> dies. Kernel processes are key
        components of the runtime system. Users do not normally add
        new kernel processes.</p></dd>
      <dt><strong><span class="code">{apply, {Mod, Func, Args}}</span>.</strong></dt>
        <dd><p>The init process
        evaluates <span class="code">apply(Mod, Func, Args)</span>. The system
        terminates if this results in an error. The boot procedure
        hangs if this function never returns.</p></dd>
    </dl>
    <div class="note">
<div class="label">Note</div>
<div class="content"><p>
      <p>In an interactive system, the code loader provides
        demand-driven code loading, but in an embedded system
        the code loader loads all code immediately. The same
        version of <span class="bold_code bc-18"><a href="javascript:erlhref('../../../../doc/../','kernel','code.html');"><span class="code">code</span></a></span>
	is used in both cases. The code server calls
	<span class="bold_code bc-13"><a href="javascript:erlhref('../../../../doc/../','erts','init.html#get_argument-1');"><span class="code">init:get_argument(mode)</span></a></span>
	to determine if it is to run in demand mode or non-demand
        driven mode.</p>
    </p></div>
</div>
  </div>

  <h3><span onMouseOver="document.getElementById('ghlink-see-also-idm281472970895128').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-see-also-idm281472970895128').style.visibility = 'hidden';"><span id="ghlink-see-also-idm281472970895128" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/sasl/doc/src/script.xml#L157" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="see-also" href="#see-also">See Also</a></span></h3>
<div class="REFBODY rb-3">
    
    <p><span class="bold_code bc-19"><a href="systools.html"><span class="code">systools(3)</span></a></span></p>
  </div>
</div>
<div class="footer">
<hr>
<p>Copyright © 1997-2019 Ericsson AB. All Rights Reserved.</p>
</div>
</div>
</div>
<script type="text/javascript">window.__otpTopDocDir = '../../../../doc/js/';</script><script type="text/javascript" src="../../../../doc/js/highlight.js"></script>
</body>
</html>