diff options
author | Sverker Eriksson <[email protected]> | 2019-01-28 20:01:44 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2019-01-28 20:01:44 +0100 |
commit | 780c5a2c43591fc17925177120b67b99d26e70e7 (patch) | |
tree | ff7db25c8a814c2700cde51592bb617435df096f | |
parent | ad5822c6b1401111bbdbc5e77fe097a3f1b2b3cb (diff) | |
download | otp-780c5a2c43591fc17925177120b67b99d26e70e7.tar.gz otp-780c5a2c43591fc17925177120b67b99d26e70e7.tar.bz2 otp-780c5a2c43591fc17925177120b67b99d26e70e7.zip |
erts: Add doc warnings for erlang:port_command|call|control
done on unknown ports.
-rw-r--r-- | erts/doc/src/erlang.xml | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index fabca87e9f..0536f4745f 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -4170,9 +4170,16 @@ RealSystem = system + MissedSystem</code> </item> <tag><c>badarg</c></tag> <item> - If the port driver so decides for any reason (probably + <p>If the port driver so decides for any reason (probably something wrong with <c><anno>Operation</anno></c> - or <c><anno>Data</anno></c>). + or <c><anno>Data</anno></c>).</p> + <warning> + <p>Do not call <c>port_call</c> with an unknown + <c><anno>Port</anno></c> identifier and expect <c>badarg</c> + exception. Any undefined behavior is possible (including node + crash) depending on how the port driver interprets the supplied + arguments.</p> + </warning> </item> </taglist> </desc> @@ -4262,6 +4269,11 @@ RealSystem = system + MissedSystem</code> <p>If <c><anno>Data</anno></c> is an invalid I/O list.</p> </item> </taglist> + <warning> + <p>Do not send data to an unknown port. Any undefined behavior is + possible (including node crash) depending on how the port driver + interprets the data.</p> + </warning> </desc> </func> @@ -4321,6 +4333,11 @@ RealSystem = system + MissedSystem</code> a busy port. </item> </taglist> + <warning> + <p>Do not send data to an unknown port. Any undefined behavior is + possible (including node crash) depending on how the port driver + interprets the data.</p> + </warning> </desc> </func> @@ -4425,6 +4442,13 @@ RealSystem = system + MissedSystem</code> If the port driver so decides for any reason (probably something wrong with <c><anno>Operation</anno></c> or <c><anno>Data</anno></c>). + <warning> + <p>Do not call <c>port_control/3</c> with an unknown + <c><anno>Port</anno></c> identifier and expect <c>badarg</c> + exception. Any undefined behavior is possible (including node + crash) depending on how the port driver interprets the supplied + arguments.</p> + </warning> </item> </taglist> </desc> |