File 3532-Reference-manual-Improve-documentation-of-the-pid-ty.patch of Package erlang

From 38ade3eb69faf1fa6c25d1b703cb92944a2603ad Mon Sep 17 00:00:00 2001
From: Rickard Green <rickard@erlang.org>
Date: Tue, 23 Mar 2021 23:00:31 +0100
Subject: [PATCH 2/6] Reference manual: Improve documentation of the 'pid' type

---
 system/doc/reference_manual/data_types.xml | 35 +++++++++++++---------
 1 file changed, 21 insertions(+), 14 deletions(-)

diff --git a/system/doc/reference_manual/data_types.xml b/system/doc/reference_manual/data_types.xml
index 9405dca0a1..297a3c21a2 100644
--- a/system/doc/reference_manual/data_types.xml
+++ b/system/doc/reference_manual/data_types.xml
@@ -200,22 +200,29 @@ phone_number
   </section>
 
   <section>
-    <title>Pid</title>
-    <p>A process identifier, pid, identifies a process.</p>
-    <p>The following BIFs, which are used to create processes, return
-      values of this data type:</p>
-    <list type="bulleted">
-      <item><c>spawn/1,2,3,4</c></item>
-      <item><c>spawn_link/1,2,3,4</c></item>
-      <item><c>spawn_opt/4</c></item>
-    </list>
+    <title>PID</title>
+    <p>
+      PID is an abbreviation for process identifier. Each process has
+      a PID which identifies the process. PIDs are unique among processes
+      that are alive on connected nodes. However, a PID of a terminated
+      process may be reused as a PID for a new process after a while.
+    </p>
+    <p>
+      The BIF <seealso marker="erts:erlang#self/0"><c>self/0</c></seealso>
+      returns the PID of the calling process. When
+      <seealso marker="processes#process-creation">creating a new
+      process</seealso>, the parent process will be able to get the PID
+      of the child process either via the return value, as is the case
+      when calling the <seealso marker="erts:erlang#spawn/3"><c>spawn/3</c></seealso>
+      BIF, or via a message, which is the case when calling the
+      <seealso marker="erts:erlang#spawn_request/5"><c>spawn_request/5</c></seealso>
+      BIF. A PID is typically used when when sending a process a
+      <seealso marker="processes#signals">signal</seealso>. The
+      <seealso marker="erts:erlang#is_pid/1"><c>is_pid/1</c></seealso>
+      BIF can be used to test whether a term is a PID. 
+    </p>
     <p><em>Example:</em></p>
     <pre>
-1> <input>spawn(m, f, []).</input>
-&lt;0.51.0></pre>
-    <p>In the following example, the BIF <c>self()</c> returns
-      the pid of the calling process:</p>
-    <pre>
 -module(m).
 -export([loop/0]).
 
-- 
2.26.2

openSUSE Build Service is sponsored by