File 3632-system-Flag-for-the-removal-of-fun-creator-pid-in-OT.patch of Package erlang

From 05cd4bc51d4edaccd09ce1e1dce2dfe1ae0d1b73 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?John=20H=C3=B6gberg?= <john@erlang.org>
Date: Fri, 3 Mar 2023 14:00:05 +0100
Subject: [PATCH 2/2] system: Flag for the removal of fun creator pid in OTP 27

---
 erts/doc/src/erlang.xml                       |  9 +++++++++
 .../upcoming_incompatibilities.xml            | 19 +++++++++++++++++++
 2 files changed, 28 insertions(+)

diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index b99448428b..f7358c834d 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -2545,6 +2545,15 @@ of Floating Point Numbers</seeguide>.</p>
               <c>Fun</c> was statically allocated when module was
               loaded (this optimisation is performed for local
               functions that do not capture the environment).</p>
+            <change>
+              <p>In Erlang/OTP 27, we plan to change the return value so that
+                it always points to the local <c>init</c> process, regardless
+                of which process or node the fun was originally created on. See
+                <seeguide marker="system/general_info:upcoming_incompatibilities#fun_creator_pid">
+                  Upcoming Potential Incompatibilities
+                </seeguide>.
+              </p>
+            </change>
           </item>
           <tag><c>{index, Index}</c></tag>
           <item>
diff --git a/system/doc/general_info/upcoming_incompatibilities.xml b/system/doc/general_info/upcoming_incompatibilities.xml
index 17fbd135b3..2fd70093b7 100644
--- a/system/doc/general_info/upcoming_incompatibilities.xml
+++ b/system/doc/general_info/upcoming_incompatibilities.xml
@@ -108,6 +108,25 @@
         </item>
       </list>
     </section>
+  </section>
+
+  <section>
+    <title>OTP 27</title>
 
+    <section>
+      <marker id="fun_creator_pid"/>
+      <title>Fun creator pid will be removed</title>
+      <p>
+        As of OTP 27, the functions
+        <seemfa marker="erts:erlang#fun_info/1">
+        <c>erlang:fun_info/1,2</c></seemfa> will always say that the local
+        <c>init</c> process created all funs, regardless of which process or
+        node the fun was originally created on.
+      </p>
+      <p>
+        In OTP 28, the <c>{pid,_}</c>element will be removed altogether.
+      </p>
+    </section>
   </section>
+
 </chapter>
-- 
2.35.3

openSUSE Build Service is sponsored by