diff options
Diffstat (limited to 'lib/stdlib/doc')
| -rw-r--r-- | lib/stdlib/doc/src/Makefile | 1 | ||||
| -rw-r--r-- | lib/stdlib/doc/src/binary.xml | 4 | ||||
| -rw-r--r-- | lib/stdlib/doc/src/gen_event.xml | 35 | ||||
| -rw-r--r-- | lib/stdlib/doc/src/gen_fsm.xml | 48 | ||||
| -rw-r--r-- | lib/stdlib/doc/src/gen_server.xml | 41 | ||||
| -rw-r--r-- | lib/stdlib/doc/src/notes.xml | 93 | ||||
| -rw-r--r-- | lib/stdlib/doc/src/pg.xml | 114 | ||||
| -rw-r--r-- | lib/stdlib/doc/src/proc_lib.xml | 36 | ||||
| -rw-r--r-- | lib/stdlib/doc/src/ref_man.xml | 1 | ||||
| -rw-r--r-- | lib/stdlib/doc/src/specs.xml | 1 | ||||
| -rw-r--r-- | lib/stdlib/doc/src/sys.xml | 13 | 
11 files changed, 245 insertions, 142 deletions
| diff --git a/lib/stdlib/doc/src/Makefile b/lib/stdlib/doc/src/Makefile index ff77c3eea0..f5d8b2072a 100644 --- a/lib/stdlib/doc/src/Makefile +++ b/lib/stdlib/doc/src/Makefile @@ -76,7 +76,6 @@ XML_REF3_FILES = \  	ms_transform.xml \  	orddict.xml \  	ordsets.xml \ -	pg.xml \  	pool.xml \  	proc_lib.xml \  	proplists.xml \ diff --git a/lib/stdlib/doc/src/binary.xml b/lib/stdlib/doc/src/binary.xml index 2410f1f9b8..0fde763bfb 100644 --- a/lib/stdlib/doc/src/binary.xml +++ b/lib/stdlib/doc/src/binary.xml @@ -5,7 +5,7 @@    <header>      <copyright>        <year>2009</year> -      <year>2013</year> +      <year>2014</year>        <holder>Ericsson AB, All Rights Reserved</holder>      </copyright>      <legalnotice> @@ -450,7 +450,7 @@ store(Binary, GBSet) ->        </code>        <p>In this example, we chose to copy the binary content before -      inserting it in the <c>gb_set()</c> if it references a binary more than +      inserting it in the <c>gb_sets:set()</c> if it references a binary more than        twice the size of the data we're going to keep. Of course        different rules for when copying will apply to different        programs.</p> diff --git a/lib/stdlib/doc/src/gen_event.xml b/lib/stdlib/doc/src/gen_event.xml index b9dfff833e..5c96d6e576 100644 --- a/lib/stdlib/doc/src/gen_event.xml +++ b/lib/stdlib/doc/src/gen_event.xml @@ -4,7 +4,7 @@  <erlref>    <header>      <copyright> -      <year>1996</year><year>2013</year> +      <year>1996</year><year>2014</year>        <holder>Ericsson AB. All Rights Reserved.</holder>      </copyright>      <legalnotice> @@ -44,6 +44,7 @@      <pre>  gen_event module                   Callback module  ----------------                   --------------- +gen_event:start  gen_event:start_link       ----->  -  gen_event:add_handler @@ -177,7 +178,7 @@ gen_event:stop             ----->  Module:terminate/2        <name>add_handler(EventMgrRef, Handler, Args) -> Result</name>        <fsummary>Add an event handler to a generic event manager.</fsummary>        <type> -        <v>EventMgr = Name | {Name,Node} | {global,GlobalName} +        <v>EventMgrRef = Name | {Name,Node} | {global,GlobalName}  	| {via,Module,ViaName} | pid()</v>          <v> Name = Node = atom()</v>          <v> GlobalName = ViaName = term()</v> @@ -223,7 +224,7 @@ gen_event:stop             ----->  Module:terminate/2        <name>add_sup_handler(EventMgrRef, Handler, Args) -> Result</name>        <fsummary>Add a supervised event handler to a generic event manager.</fsummary>        <type> -        <v>EventMgr = Name | {Name,Node} | {global,GlobalName} +        <v>EventMgrRef = Name | {Name,Node} | {global,GlobalName}  	| {via,Module,ViaName} | pid()</v>          <v> Name = Node = atom()</v>          <v> GlobalName = ViaName = term()</v> @@ -456,19 +457,37 @@ gen_event:stop             ----->  Module:terminate/2      </func>      <func>        <name>stop(EventMgrRef) -> ok</name> +      <name>stop(EventMgrRef, Reason, Timeout) -> ok</name>        <fsummary>Terminate a generic event manager.</fsummary>        <type>          <v>EventMgrRef = Name | {Name,Node} | {global,GlobalName}  	| {via,Module,ViaName} | pid()</v>          <v>Name = Node = atom()</v>          <v>GlobalName = ViaName = term()</v> +        <v>Reason = term()</v> +        <v>Timeout = int()>0 | infinity</v>        </type>        <desc> -        <p>Terminates the event manager <c>EventMgrRef</c>. Before -          terminating, the event manager will call -          <c>Module:terminate(stop,...)</c> for each installed event -          handler.</p> -        <p>See <c>add_handler/3</c> for a description of the argument.</p> +        <p>Orders the event manager <c>EventMgrRef</c> to exit with +          the given <c>Reason</c> and waits for it to +          terminate. Before terminating, the gen_event will call +          <seealso marker="#Module:terminate/2">Module:terminate(stop,...)</seealso> +	  for each installed event handler.</p> +	<p>The function returns <c>ok</c> if the event manager terminates +	  with the expected reason. Any other reason than <c>normal</c>, +          <c>shutdown</c>, or <c>{shutdown,Term}</c> will cause an +          error report to be issued using +          <seealso marker="kernel:error_logger#format/2">error_logger:format/2</seealso>. +	  The default <c>Reason</c> is <c>normal</c>.</p> +	<p><c>Timeout</c> is an integer greater than zero which +          specifies how many milliseconds to wait for the event manager to +          terminate, or the atom <c>infinity</c> to wait +          indefinitely. The default value is <c>infinity</c>. If the +          event manager has not terminated within the specified time, a +          <c>timeout</c> exception is raised.</p> +	<p>If the process does not exist, a <c>noproc</c> exception +	  is raised.</p> +        <p>See <c>add_handler/3</c> for a description of <c>EventMgrRef</c>.</p>        </desc>      </func>    </funcs> diff --git a/lib/stdlib/doc/src/gen_fsm.xml b/lib/stdlib/doc/src/gen_fsm.xml index 1713367bd8..b1bba3eff0 100644 --- a/lib/stdlib/doc/src/gen_fsm.xml +++ b/lib/stdlib/doc/src/gen_fsm.xml @@ -4,7 +4,7 @@  <erlref>    <header>      <copyright> -      <year>1996</year><year>2013</year> +      <year>1996</year><year>2014</year>        <holder>Ericsson AB. All Rights Reserved.</holder>      </copyright>      <legalnotice> @@ -43,8 +43,11 @@      <pre>  gen_fsm module                    Callback module  --------------                    --------------- +gen_fsm:start  gen_fsm:start_link                -----> Module:init/1 +gen_fsm:stop                      -----> Module:terminate/3 +  gen_fsm:send_event                -----> Module:StateName/2  gen_fsm:send_all_state_event      -----> Module:handle_event/3 @@ -115,7 +118,7 @@ gen_fsm:sync_send_all_state_event -----> Module:handle_sync_event/4            If <c>FsmName={global,GlobalName}</c>, the gen_fsm is            registered globally as <c>GlobalName</c> using            <c>global:register_name/2</c>. -	  If <c>EventMgrName={via,Module,ViaName}</c>, the event manager will +	  If <c>FsmName={via,Module,ViaName}</c>, the gen_fsm will  	  register with the registry represented by <c>Module</c>.  	  The <c>Module</c> callback should export the functions  	  <c>register_name/2</c>, <c>unregister_name/1</c>, @@ -187,6 +190,39 @@ gen_fsm:sync_send_all_state_event -----> Module:handle_sync_event/4        </desc>      </func>      <func> +      <name>stop(FsmRef) -> ok</name> +      <name>stop(FsmRef, Reason, Timeout) -> ok</name> +      <fsummary>Synchronously stop a generic FSM.</fsummary> +      <type> +        <v>FsmRef = Name | {Name,Node} | {global,GlobalName} +	| {via,Module,ViaName} | pid()</v> +        <v> Node = atom()</v> +        <v> GlobalName = ViaName = term()</v> +        <v>Reason = term()</v> +        <v>Timeout = int()>0 | infinity</v> +      </type> +      <desc> +	<p>Orders a generic FSM to exit with the given <c>Reason</c> +	  and waits for it to terminate. The gen_fsm will call +          <seealso marker="#Module:terminate/3">Module:terminate/3</seealso> +	  before exiting.</p> +	<p>The function returns <c>ok</c> if the generic FSM terminates +	  with the expected reason. Any other reason than <c>normal</c>, +          <c>shutdown</c>, or <c>{shutdown,Term}</c> will cause an +          error report to be issued using +          <seealso marker="kernel:error_logger#format/2">error_logger:format/2</seealso>. +	  The default <c>Reason</c> is <c>normal</c>.</p> +	<p><c>Timeout</c> is an integer greater than zero which +          specifies how many milliseconds to wait for the generic FSM +          to terminate, or the atom <c>infinity</c> to wait +          indefinitely. The default value is <c>infinity</c>. If the +          generic FSM has not terminated within the specified time, a +	  <c>timeout</c> exception is raised.</p> +	<p>If the process does not exist, a <c>noproc</c> exception +	  is raised.</p> +      </desc> +    </func> +    <func>        <name>send_event(FsmRef, Event) -> ok</name>        <fsummary>Send an event asynchronously to a generic FSM.</fsummary>        <type> @@ -210,7 +246,7 @@ gen_fsm:sync_send_all_state_event -----> Module:handle_sync_event/4  	  registered at another node, or</item>  	  <item><c>{global,GlobalName}</c>, if the gen_fsm is globally  	  registered.</item> -	  <item><c>{via,Module,ViaName}</c>, if the event manager is registered +	  <item><c>{via,Module,ViaName}</c>, if the gen_fsm is registered  	  through an alternative process registry.</item>          </list>          <p><c>Event</c> is an arbitrary term which is passed as one of @@ -528,7 +564,8 @@ gen_fsm:sync_send_all_state_event -----> Module:handle_sync_event/4            <c>Module:init/1</c> for a description of <c>Timeout</c> and <c>hibernate</c>.</p>          <p>If the function returns <c>{stop,Reason,NewStateData}</c>,            the gen_fsm will call -          <c>Module:terminate(Reason,NewStateData)</c> and terminate.</p> +          <c>Module:terminate(Reason,StateName,NewStateData)</c> and +          terminate.</p>        </desc>      </func>      <func> @@ -614,7 +651,8 @@ gen_fsm:sync_send_all_state_event -----> Module:handle_sync_event/4            <c>{stop,Reason,NewStateData}</c>, any reply to <c>From</c>            must be given explicitly using <c>gen_fsm:reply/2</c>.            The gen_fsm will then call -          <c>Module:terminate(Reason,NewStateData)</c> and terminate.</p> +          <c>Module:terminate(Reason,StateName,NewStateData)</c> and +          terminate.</p>        </desc>      </func>      <func> diff --git a/lib/stdlib/doc/src/gen_server.xml b/lib/stdlib/doc/src/gen_server.xml index 4c83fde237..a915e567a5 100644 --- a/lib/stdlib/doc/src/gen_server.xml +++ b/lib/stdlib/doc/src/gen_server.xml @@ -4,7 +4,7 @@  <erlref>    <header>      <copyright> -      <year>1996</year><year>2013</year> +      <year>1996</year><year>2014</year>        <holder>Ericsson AB. All Rights Reserved.</holder>      </copyright>      <legalnotice> @@ -43,8 +43,11 @@      <pre>  gen_server module            Callback module  -----------------            --------------- +gen_server:start  gen_server:start_link -----> Module:init/1 +gen_server:stop       -----> Module:terminate/2 +  gen_server:call  gen_server:multi_call -----> Module:handle_call/3 @@ -113,7 +116,7 @@ gen_server:abcast     -----> Module:handle_cast/2            registered globally as <c>GlobalName</c> using            <c>global:register_name/2</c>. If no name is provided,            the gen_server is not registered. -	  If <c>EventMgrName={via,Module,ViaName}</c>, the event manager will +	  If <c>ServerName={via,Module,ViaName}</c>, the gen_server will  	  register with the registry represented by <c>Module</c>.  	  The <c>Module</c> callback should export the functions  	  <c>register_name/2</c>, <c>unregister_name/1</c>, @@ -184,6 +187,40 @@ gen_server:abcast     -----> Module:handle_cast/2        </desc>      </func>      <func> +      <name>stop(ServerRef) -> ok</name> +      <name>stop(ServerRef, Reason, Timeout) -> ok</name> +      <fsummary>Synchronously stop a generic server.</fsummary> +      <type> +        <v>ServerRef = Name | {Name,Node} | {global,GlobalName} +	| {via,Module,ViaName} | pid()</v> +        <v> Node = atom()</v> +        <v> GlobalName = ViaName = term()</v> +        <v>Reason = term()</v> +        <v>Timeout = int()>0 | infinity</v> +      </type> +      <desc> +	<p>Orders a generic server to exit with the +	  given <c>Reason</c> and waits for it to terminate. The +	  gen_server will call +          <seealso marker="#Module:terminate/2">Module:terminate/2</seealso> +	  before exiting.</p> +	<p>The function returns <c>ok</c> if the server terminates +	  with the expected reason. Any other reason than <c>normal</c>, +          <c>shutdown</c>, or <c>{shutdown,Term}</c> will cause an +          error report to be issued using +          <seealso marker="kernel:error_logger#format/2">error_logger:format/2</seealso>. +	  The default <c>Reason</c> is <c>normal</c>.</p> +	<p><c>Timeout</c> is an integer greater than zero which +          specifies how many milliseconds to wait for the server to +          terminate, or the atom <c>infinity</c> to wait +          indefinitely. The default value is <c>infinity</c>. If the +          server has not terminated within the specified time, a +          <c>timeout</c> exception is raised.</p> +	<p>If the process does not exist, a <c>noproc</c> exception +	  is raised.</p> +      </desc> +    </func> +    <func>        <name>call(ServerRef, Request) -> Reply</name>        <name>call(ServerRef, Request, Timeout) -> Reply</name>        <fsummary>Make a synchronous call to a generic server.</fsummary> diff --git a/lib/stdlib/doc/src/notes.xml b/lib/stdlib/doc/src/notes.xml index 15e6fdfa9f..0421d560b6 100644 --- a/lib/stdlib/doc/src/notes.xml +++ b/lib/stdlib/doc/src/notes.xml @@ -30,6 +30,87 @@    </header>    <p>This document describes the changes made to the STDLIB application.</p> +<section><title>STDLIB 2.1</title> + +    <section><title>Fixed Bugs and Malfunctions</title> +      <list> +        <item> +	    <p><c>filelib:wildcard("broken_symlink")</c> would return +	    an empty list if "broken_symlink" was a symlink that did +	    not point to an existing file.</p> +          <p> +	    Own Id: OTP-11850 Aux Id: seq12571 </p> +        </item> +        <item> +	    <p><c>erl_tar</c> can now handle files names that contain +	    Unicode characters. See "UNICODE SUPPORT" in the +	    documentation for <c>erl_tar</c>.</p> +	    <p>When creating a tar file, <c>erl_tar</c> would +	    sometime write a too short end of tape marker. GNU tar +	    would correctly extract files from such tar file, but +	    would complain about "A lone zero block at...".</p> +          <p> +	    Own Id: OTP-11854</p> +        </item> +        <item> +	    <p> When redefining and exporting the type <c>map()</c> +	    the Erlang Code Linter (<c>erl_lint</c>) erroneously +	    emitted an error. This bug has been fixed. </p> +          <p> +	    Own Id: OTP-11872</p> +        </item> +        <item> +          <p> +	    Fix evaluation of map updates in the debugger and +	    erl_eval</p> +          <p> +	    Reported-by: José Valim</p> +          <p> +	    Own Id: OTP-11922</p> +        </item> +      </list> +    </section> + + +    <section><title>Improvements and New Features</title> +      <list> +        <item> +	    <p>The following native functions now bump an appropriate +	    amount of reductions and yield when out of +	    reductions:</p> <list> +	    <item><c>erlang:binary_to_list/1</c></item> +	    <item><c>erlang:binary_to_list/3</c></item> +	    <item><c>erlang:bitstring_to_list/1</c></item> +	    <item><c>erlang:list_to_binary/1</c></item> +	    <item><c>erlang:iolist_to_binary/1</c></item> +	    <item><c>erlang:list_to_bitstring/1</c></item> +	    <item><c>binary:list_to_bin/1</c></item> </list> +	    <p>Characteristics impact:</p> <taglist> +	    <tag>Performance</tag> <item>The functions converting +	    from lists got a performance loss for very small lists, +	    and a performance gain for very large lists.</item> +	    <tag>Priority</tag> <item>Previously a process executing +	    one of these functions effectively got an unfair priority +	    boost. This priority boost depended on the input size. +	    The larger the input was, the larger the priority boost +	    got. This unfair priority boost is now lost. </item> +	    </taglist> +          <p> +	    Own Id: OTP-11888</p> +        </item> +        <item> +          <p> +	    Add <c>maps:get/3</c> to maps module. The function will +	    return the supplied default value if the key does not +	    exist in the map.</p> +          <p> +	    Own Id: OTP-11951</p> +        </item> +      </list> +    </section> + +</section> +  <section><title>STDLIB 2.0</title>      <section><title>Fixed Bugs and Malfunctions</title> @@ -343,10 +424,10 @@  	    "hello"}, % add new associations</c></item> <item><c>#{  	    "hi" := V1, a := V2, b := V3} = M2. % match keys with  	    values</c></item> </taglist></p> -          <p> -	    For information on how to use Maps please see the -	    <seealso marker="doc/reference_manual:maps">Reference -	    Manual</seealso>.</p> +        <p> +	    For information on how to use Maps please see Map Expressions in the +		<seealso marker="doc/reference_manual:expressions#map_expressions"> +			Reference Manual</seealso>.</p>            <p>  	    The current implementation is without the following  	    features: <taglist> <item>No variable keys</item> @@ -2193,7 +2274,7 @@  	    platforms than before. If <c>configure</c> warns about no  	    atomic implementation available, try using the  	    <c>libatomic_ops</c> library. Use the <seealso -	    marker="doc/installation_guide:INSTALL#How-to-Build-and-Install-ErlangOTP_A-Closer-Look-at-the-individual-Steps_Configuring">--with-libatomic_ops=PATH</seealso> +	    marker="doc/installation_guide:INSTALL#Advanced-configuration-and-build-of-ErlangOTP">--with-libatomic_ops=PATH</seealso>  	    <c>configure</c> command line argument when specifying  	    where the <c>libatomic_ops</c> installation is located.  	    The <c>libatomic_ops</c> library can be downloaded from: @@ -2211,7 +2292,7 @@  	    the pentium 4 processor. If you want the runtime system  	    to be compatible with older processors (back to 486) you  	    need to pass the <seealso -	    marker="doc/installation_guide:INSTALL#How-to-Build-and-Install-ErlangOTP_A-Closer-Look-at-the-individual-Steps_Configuring">--enable-ethread-pre-pentium4-compatibility</seealso> +	    marker="doc/installation_guide:INSTALL#Advanced-configuration-and-build-of-ErlangOTP">--enable-ethread-pre-pentium4-compatibility</seealso>  	    <c>configure</c> command line argument when configuring  	    the system.</p>            <p> diff --git a/lib/stdlib/doc/src/pg.xml b/lib/stdlib/doc/src/pg.xml deleted file mode 100644 index a3b69884b6..0000000000 --- a/lib/stdlib/doc/src/pg.xml +++ /dev/null @@ -1,114 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!DOCTYPE erlref SYSTEM "erlref.dtd"> - -<erlref> -  <header> -    <copyright> -      <year>1996</year> -      <year>2014</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. - -  The Initial Developer of the Original Code is Ericsson AB. -    </legalnotice> - -    <title>pg</title> -    <prepared></prepared> -    <docno></docno> -    <date></date> -    <rev></rev> -  </header> -  <module>pg</module> -  <modulesummary>Distributed, Named Process Groups</modulesummary> -  <description> -    <warning> -      <p>This module is deprecated and will be removed in Erlang/OTP 18.</p> -    </warning> -    <p>This (experimental) module implements process groups. A process -      group is a group of processes that can be accessed by a common -      name. For example, a group named <c>foobar</c> can include a set -      of processes as members of this group and they can be located on -      different nodes.</p> -    <p>When messages are sent to the named group, all members of -      the group receive the message. The messages are serialized. If -      the process <c>P1</c> sends the message <c>M1</c> to the group, -      and process <c>P2</c> simultaneously sends message <c>M2</c>, then -      all members of the group receive the two messages in the same -      order. If members of a group terminate, they are automatically  -      removed from the group.</p> -    <p>This module is not complete. The module is inspired by the ISIS -      system and the causal order protocol of the ISIS system should  -      also be implemented. At the moment, all messages are serialized -      by sending them through a group master process.</p> -  </description> -  <funcs> -    <func> -      <name name="create" arity="1"/> -      <fsummary>Create an empty group</fsummary> -      <desc> -        <p>Creates an empty group named <c><anno>PgName</anno></c> on the current -          node.</p> -      </desc> -    </func> -    <func> -      <name name="create" arity="2"/> -      <fsummary>Create an empty group on another node</fsummary> -      <desc> -        <p>Creates an empty group named <c><anno>PgName</anno></c> on the node -          <c><anno>Node</anno></c>.</p> -      </desc> -    </func> -    <func> -      <name name="join" arity="2"/> -      <fsummary>Join a pid to a process group</fsummary> -      <desc> -        <p>Joins the pid <c><anno>Pid</anno></c> to the process group -          <c><anno>PgName</anno></c>. -          Returns a list of all old members of the group.</p> -      </desc> -    </func> -    <func> -      <name name="send" arity="2"/> -      <fsummary>Send a message to all members of a process group</fsummary> -      <desc> -        <p>Sends the tuple <c>{pg_message, From, PgName, Msg}</c> to -          all members of the process group <c><anno>PgName</anno></c>.</p> -        <p>Failure: <c>{badarg, {<anno>PgName</anno>, <anno>Msg</anno>}}</c> -          if <c><anno>PgName</anno></c> is -          not a process group (a globally registered name).</p> -      </desc> -    </func> -    <func> -      <name name="esend" arity="2"/> -      <fsummary>Send a message to all members of a process group, except ourselves</fsummary> -      <desc> -        <p>Sends the tuple <c>{pg_message, From, PgName, Msg}</c> to -          all members of the process group <c><anno>PgName</anno></c>, except -          ourselves.</p> -        <p>Failure: <c>{badarg, {<anno>PgName</anno>, <anno>Msg</anno>}}</c> -          if <c><anno>PgName</anno></c> is -          not a process group (a globally registered name).</p> -      </desc> -    </func> -    <func> -      <name name="members" arity="1"/> -      <fsummary>Return a list of all members of a process group</fsummary> -      <desc> -        <p>Returns a list of all members of the process group -          <c>PgName</c>.</p> -      </desc> -    </func> -  </funcs> -</erlref> - diff --git a/lib/stdlib/doc/src/proc_lib.xml b/lib/stdlib/doc/src/proc_lib.xml index 5bf5744622..f27a974242 100644 --- a/lib/stdlib/doc/src/proc_lib.xml +++ b/lib/stdlib/doc/src/proc_lib.xml @@ -4,7 +4,7 @@  <erlref>    <header>      <copyright> -      <year>1996</year><year>2013</year> +      <year>1996</year><year>2014</year>        <holder>Ericsson AB. All Rights Reserved.</holder>      </copyright>      <legalnotice> @@ -298,6 +298,40 @@ init(Parent) ->            <c>proc_lib</c> functions.</p>        </desc>      </func> +    <func> +      <name name="stop" arity="1"/> +      <fsummary>Terminate a process synchronously.</fsummary> +      <type variable="Process"/> +      <desc> +	<p>Equivalent to <seealso marker="#stop/3">stop(Process, +	    normal, infinity)</seealso>.</p> +      </desc> +    </func> +    <func> +      <name name="stop" arity="3"/> +      <fsummary>Terminate a process synchronously.</fsummary> +      <type variable="Process"/> +      <type variable="Reason"/> +      <type variable="Timeout"/> +      <desc> +        <p>Orders the process to exit with the given <c>Reason</c> and +          waits for it to terminate.</p> +	<p>The function returns <c>ok</c> if the process exits with +	  the given <c>Reason</c> within <c>Timeout</c> +	  milliseconds.</p> +	<p>If the call times out, a <c>timeout</c> exception is +	  raised.</p> +	<p>If the process does not exist, a <c>noproc</c> +	  exception is raised.</p> +	<p>The implementation of this function is based on the +	  <c>terminate</c> system message, and requires that the +	  process handles system messages  correctly. +	  See <seealso marker="sys">sys(3)</seealso> +	  and <seealso marker="doc/design_principles:spec_proc">OTP +	  Design Principles</seealso> for information about system +	  messages.</p> +      </desc> +    </func>    </funcs>    <section> diff --git a/lib/stdlib/doc/src/ref_man.xml b/lib/stdlib/doc/src/ref_man.xml index 6c35578bdf..ea4009dc3e 100644 --- a/lib/stdlib/doc/src/ref_man.xml +++ b/lib/stdlib/doc/src/ref_man.xml @@ -73,7 +73,6 @@    <xi:include href="ms_transform.xml"/>    <xi:include href="orddict.xml"/>    <xi:include href="ordsets.xml"/> -  <xi:include href="pg.xml"/>    <xi:include href="pool.xml"/>    <xi:include href="proc_lib.xml"/>    <xi:include href="proplists.xml"/> diff --git a/lib/stdlib/doc/src/specs.xml b/lib/stdlib/doc/src/specs.xml index 60a04ed5e7..fd77b52da6 100644 --- a/lib/stdlib/doc/src/specs.xml +++ b/lib/stdlib/doc/src/specs.xml @@ -39,7 +39,6 @@    <xi:include href="../specs/specs_ms_transform.xml"/>    <xi:include href="../specs/specs_orddict.xml"/>    <xi:include href="../specs/specs_ordsets.xml"/> -  <xi:include href="../specs/specs_pg.xml"/>    <xi:include href="../specs/specs_pool.xml"/>    <xi:include href="../specs/specs_proc_lib.xml"/>    <xi:include href="../specs/specs_proplists.xml"/> diff --git a/lib/stdlib/doc/src/sys.xml b/lib/stdlib/doc/src/sys.xml index a46fa1289f..7fb82e0e7e 100644 --- a/lib/stdlib/doc/src/sys.xml +++ b/lib/stdlib/doc/src/sys.xml @@ -4,7 +4,7 @@  <erlref>    <header>      <copyright> -      <year>1996</year><year>2013</year> +      <year>1996</year><year>2014</year>        <holder>Ericsson AB. All Rights Reserved.</holder>      </copyright>      <legalnotice> @@ -356,6 +356,17 @@            installed.</p>        </desc>      </func> +    <func> +      <name name="terminate" arity="2"/> +      <name name="terminate" arity="3"/> +      <fsummary>Terminate the process</fsummary> +      <desc> +        <p>This function orders the process to terminate with the +        given <c><anno>Reason</anno></c>. The termination is done +        asynchronously, so there is no guarantee that the process is +        actually terminated when the function returns.</p> +      </desc> +    </func>    </funcs>    <section> | 
