Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
3602-Reference-manual-Improve-documentation-of-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 3602-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 <seemfa marker="erts:erlang#self/0"><c>self/0</c></seemfa> + returns the PID of the calling process. When + <seeguide marker="processes#process-creation">creating a new + process</seeguide>, 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 <seemfa marker="erts:erlang#spawn/3"><c>spawn/3</c></seemfa> + BIF, or via a message, which is the case when calling the + <seemfa marker="erts:erlang#spawn_request/5"><c>spawn_request/5</c></seemfa> + BIF. A PID is typically used when when sending a process a + <seeguide marker="processes#signals">signal</seeguide>. The + <seemfa marker="erts:erlang#is_pid/1"><c>is_pid/1</c></seemfa> + 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> -<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
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor