From dc9ff931423b57e64abde0f1de7133f334abb780 Mon Sep 17 00:00:00 2001
From: Rickard Green
Date: Mon, 25 Nov 2013 15:34:03 +0100
Subject: Ensure exit signal due to link precede port BIF return
---
erts/doc/src/erlang.xml | 162 +++++++++++++++++++++++++++++++++++++++---------
1 file changed, 133 insertions(+), 29 deletions(-)
(limited to 'erts/doc')
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index cbb25c2cf2..062caadad3 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -3032,7 +3032,10 @@ os_prompt%
(see below), being synchronous, and that the port does
not reply with {Port, closed}. Any process may
close a port with port_close/1, not only the port owner
- (the connected process).
+ (the connected process). If the calling process is linked to
+ port identified by
@@ -3251,7 +3302,12 @@ os_prompt%
Returns a list containing tuples with information about
the Port, or undefined if the port is not open.
The order of the tuples is not defined, nor are all the
- tuples mandatory.
+ tuples mandatory.
+ If undefined is returned and the calling process
+ was linked to a previously open port identified by
+ Port, an exit signal due to this link
+ was received by the process prior to the return from
+ port_info/1.
Currently the result will containt information about the
following Items: registered_name (if the port has
a registered name), id, connected, links,
@@ -3269,7 +3325,11 @@ os_prompt%
Pid is the process identifier of the process
connected to the port.
If the port identified by Port is not open,
- undefined is returned.
+ undefined is returned. If undefined is returned and
+ the calling process was linked to a previously open port identified
+ by Port, an exit signal due to this link
+ was received by the process prior to the return from
+ port_info/2.
Failure: badarg if Port is not a local
port identifier, or an atom.
@@ -3281,7 +3341,11 @@ os_prompt%
Index is the internal index of the port. This
index may be used to separate ports.
If the port identified by Port is not open,
- undefined is returned.
+ undefined is returned. If undefined is returned and
+ the calling process was linked to a previously open port identified
+ by Port, an exit signal due to this link
+ was received by the process prior to the return from
+ port_info/2.
Failure: badarg if Port is not a local
port identifier, or an atom.
@@ -3293,7 +3357,11 @@ os_prompt%
Bytes is the total number of bytes
read from the port.
If the port identified by Port is not open,
- undefined is returned.
+ undefined is returned. If undefined is returned and
+ the calling process was linked to a previously open port identified
+ by Port, an exit signal due to this link
+ was received by the process prior to the return from
+ port_info/2.
Failure: badarg if Port is not a local
port identifier, or an atom.
@@ -3305,7 +3373,11 @@ os_prompt%
Pids is a list of the process identifiers
of the processes that the port is linked to.
If the port identified by Port is not open,
- undefined is returned.
+ undefined is returned. If undefined is returned and
+ the calling process was linked to a previously open port identified
+ by Port, an exit signal due to this link
+ was received by the process prior to the return from
+ port_info/2.
Failure: badarg if Port is not a local
port identifier, or an atom.
@@ -3320,7 +3392,11 @@ os_prompt%
that these results are highly implementation specific and might
change in the future.
If the port identified by Port is not open,
- undefined is returned.
+ undefined is returned. If undefined is returned and
+ the calling process was linked to a previously open port identified
+ by Port, an exit signal due to this link
+ was received by the process prior to the return from
+ port_info/2.
Failure: badarg if Port is not a local
port identifier, or an atom.
@@ -3334,7 +3410,11 @@ os_prompt%
that the port itself might have allocated memory which is not
included in Bytes.
If the port identified by Port is not open,
- undefined is returned.
+ undefined is returned. If undefined is returned and
+ the calling process was linked to a previously open port identified
+ by Port, an exit signal due to this link
+ was received by the process prior to the return from
+ port_info/2.
Failure: badarg if Port is not a local
port identifier, or an atom.
@@ -3346,7 +3426,11 @@ os_prompt%
Monitors represent processes that this port
is monitoring.
If the port identified by Port is not open,
- undefined is returned.
+ undefined is returned. If undefined is returned and
+ the calling process was linked to a previously open port identified
+ by Port, an exit signal due to this link
+ was received by the process prior to the return from
+ port_info/2.
Failure: badarg if Port is not a local
port identifier, or an atom.
@@ -3358,7 +3442,11 @@ os_prompt%
Name is the command name set by
open_port/2.
If the port identified by Port is not open,
- undefined is returned.
+ undefined is returned. If undefined is returned and
+ the calling process was linked to a previously open port identified
+ by Port, an exit signal due to this link
+ was received by the process prior to the return from
+ port_info/2.
Failure: badarg if Port is not a local
port identifier, or an atom.
@@ -3373,7 +3461,11 @@ os_prompt%
Command}, Options). If the port is not the result of spawning
an OS process, the value is undefined.
If the port identified by Port is not open,
- undefined is returned.
+ undefined is returned. If undefined is returned and
+ the calling process was linked to a previously open port identified
+ by Port, an exit signal due to this link
+ was received by the process prior to the return from
+ port_info/2.
Failure: badarg if Port is not a local
port identifier, or an atom.
@@ -3389,7 +3481,11 @@ os_prompt%
or Port ! {Owner, {command, Data}.
If the port identified by Port is not open,
- undefined is returned.
+ undefined is returned. If undefined is returned and
+ the calling process was linked to a previously open port identified
+ by Port, an exit signal due to this link
+ was received by the process prior to the return from
+ port_info/2.
Failure: badarg if Port is not a local
port identifier, or an atom.
@@ -3412,7 +3508,11 @@ os_prompt%
in bytes, queued by the port using the ERTS driver queue
implementation.
If the port identified by Port is not open,
- undefined is returned.
+ undefined is returned. If undefined is returned and
+ the calling process was linked to a previously open port identified
+ by Port, an exit signal due to this link
+ was received by the process prior to the return from
+ port_info/2.
Failure: badarg if Port is not a local
port identifier, or an atom.
@@ -3424,7 +3524,11 @@ os_prompt%
RegisteredName is the registered name of
the port. If the port has no registered name, [] is returned.
If the port identified by Port is not open,
- undefined is returned.
+ undefined is returned. If undefined is returned and
+ the calling process was linked to a previously open port identified
+ by Port, an exit signal due to this link
+ was received by the process prior to the return from
+ port_info/2.
Failure: badarg if Port is not a local
port identifier, or an atom.
--
cgit v1.2.3