<commit_before><?xml version="1.0" encoding="latin1" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<erlref>
  <header>
    <copyright>
      <year>1996</year><year>2009</year>
      <holder>Ericsson AB. All Rights Reserved.</holder>
    </copyright>
    <legalnotice>
      The contents of this file are subject to the Erlang Public License,
      Version 1.1, (the "License"); you may not use this file except in
      compliance with the License. You should have received a copy of the
      Erlang Public License along with this software. If not, it can be
      retrieved online at http://www.erlang.org/.
    
      Software distributed under the License is distributed on an "AS IS"
      basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
      the License for the specific language governing rights and limitations
      under the License.
    
    </legalnotice>

    <title>init</title>
    <prepared></prepared>
    <docno></docno>
    <date></date>
    <rev></rev>
    <file>init.xml</file>
  </header>
  <module>init</module>
  <modulesummary>Coordination of System Startup</modulesummary>
  <description>
    <p>The <c>init</c> module is pre-loaded and contains the code for
      the <c>init</c> system process which coordinates the start-up of
      the system. The first function evaluated at start-up is
      <c>boot(BootArgs)</c>, where <c>BootArgs</c> is a list of command
      line arguments supplied to the Erlang runtime system from
      the local operating system. See
      <seealso marker="erts:erl">erl(1)</seealso>.</p>
    <p><c>init</c> reads the boot script which contains instructions on
      how to initiate the system. See
      <seealso marker="sasl:script">script(4)</seealso> for more
      information about boot scripts.</p>
    <p><c>init</c> also contains functions to restart, reboot, and stop
      the system.</p>
  </description>
  <funcs>
    <func>
      <name>boot(BootArgs) -> void()</name>
      <fsummary>Start the Erlang runtime system</fsummary>
      <type>
        <v>BootArgs = [binary()]</v>
      </type>
      <desc>
        <p>Starts the Erlang runtime system. This function is called
          when the emulator is started and coordinates system start-up.</p>
        <p><c>BootArgs</c> are all command line arguments except
          the emulator flags, that is, flags and plain arguments. See
          <seealso marker="erts:erl">erl(1)</seealso>.</p>
        <p><c>init</c> itself interprets some of the flags, see
          <seealso marker="#flags">Command Line Flags</seealso> below.
          The remaining flags ("user flags") and plain arguments are
          passed to the <c>init</c> loop and can be retrieved by calling
          <c>get_arguments/0</c> and <c>get_plain_arguments/0</c>,
          respectively.</p>
      </desc>
    </func>
    <func>
      <name>get_args() -> [Arg]</name>
      <fsummary>Get all non-flag command line arguments</fsummary>
      <type>
        <v>Arg = atom()</v>
      </type>
      <desc>
        <p>Returns any plain command line arguments as a list of atoms
          (possibly empty). It is recommended that
          <c>get_plain_arguments/1</c> is used instead, because of
          the limited length of atoms.</p>
      </desc>
    </func>
    <func>
      <name>get_argument(Flag) -> {ok, Arg} | error</name>
      <fsummary>Get the values associated with a command line user flag</fsummary>
      <type>
        <v>Flag = atom()</v>
        <v>Arg = [Values]</v>
        <v>&nbsp;Values = [string()]</v>
      </type>
      <desc>
        <p>Returns all values associated with the command line user flag
          <c>Flag</c>. If <c>Flag</c> is provided several times, each
          <c>Values</c> is returned in preserved order.</p>
        <pre>
% <input>erl -a b c -a d</input>
...
1> <input>init:get_argument(a).</input>
{ok,[["b","c"],["d"]]}</pre>
        <p>There are also a number of flags, which are defined
          automatically and can be retrieved using this function:</p>
        <taglist><commit_msg>Remove documentation for non-existent init:get_args/0<commit_after><?xml version="1.0" encoding="latin1" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<erlref>
  <header>
    <copyright>
      <year>1996</year><year>2009</year>
      <holder>Ericsson AB. All Rights Reserved.</holder>
    </copyright>
    <legalnotice>
      The contents of this file are subject to the Erlang Public License,
      Version 1.1, (the "License"); you may not use this file except in
      compliance with the License. You should have received a copy of the
      Erlang Public License along with this software. If not, it can be
      retrieved online at http://www.erlang.org/.
    
      Software distributed under the License is distributed on an "AS IS"
      basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
      the License for the specific language governing rights and limitations
      under the License.
    
    </legalnotice>

    <title>init</title>
    <prepared></prepared>
    <docno></docno>
    <date></date>
    <rev></rev>
    <file>init.xml</file>
  </header>
  <module>init</module>
  <modulesummary>Coordination of System Startup</modulesummary>
  <description>
    <p>The <c>init</c> module is pre-loaded and contains the code for
      the <c>init</c> system process which coordinates the start-up of
      the system. The first function evaluated at start-up is
      <c>boot(BootArgs)</c>, where <c>BootArgs</c> is a list of command
      line arguments supplied to the Erlang runtime system from
      the local operating system. See
      <seealso marker="erts:erl">erl(1)</seealso>.</p>
    <p><c>init</c> reads the boot script which contains instructions on
      how to initiate the system. See
      <seealso marker="sasl:script">script(4)</seealso> for more
      information about boot scripts.</p>
    <p><c>init</c> also contains functions to restart, reboot, and stop
      the system.</p>
  </description>
  <funcs>
    <func>
      <name>boot(BootArgs) -> void()</name>
      <fsummary>Start the Erlang runtime system</fsummary>
      <type>
        <v>BootArgs = [binary()]</v>
      </type>
      <desc>
        <p>Starts the Erlang runtime system. This function is called
          when the emulator is started and coordinates system start-up.</p>
        <p><c>BootArgs</c> are all command line arguments except
          the emulator flags, that is, flags and plain arguments. See
          <seealso marker="erts:erl">erl(1)</seealso>.</p>
        <p><c>init</c> itself interprets some of the flags, see
          <seealso marker="#flags">Command Line Flags</seealso> below.
          The remaining flags ("user flags") and plain arguments are
          passed to the <c>init</c> loop and can be retrieved by calling
          <c>get_arguments/0</c> and <c>get_plain_arguments/0</c>,
          respectively.</p>
      </desc>
    </func>
    <func>
      <name>get_argument(Flag) -> {ok, Arg} | error</name>
      <fsummary>Get the values associated with a command line user flag</fsummary>
      <type>
        <v>Flag = atom()</v>
        <v>Arg = [Values]</v>
        <v>&nbsp;Values = [string()]</v>
      </type>
      <desc>
        <p>Returns all values associated with the command line user flag
          <c>Flag</c>. If <c>Flag</c> is provided several times, each
          <c>Values</c> is returned in preserved order.</p>
        <pre>
% <input>erl -a b c -a d</input>
...
1> <input>init:get_argument(a).</input>
{ok,[["b","c"],["d"]]}</pre>
        <p>There are also a number of flags, which are defined
          automatically and can be retrieved using this function:</p>
        <taglist>
{'fraction_non_alphanumeric': 0.1258605013638135, 'fraction_numerical': 0.005195479932458761, 'mean_word_length': 2.701923076923077, 'pattern_counts': {'":': 0, '<': 257, '<?xml version=': 2, '>': 264, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6848039', 'n_tokens_mistral': 2323, 'n_tokens_neox': 2271, 'n_words': 793}